Compare commits
52 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab2517d538 | ||
|
|
9fc440df7b | ||
|
|
f652a4d807 | ||
|
|
a6bb785b5f | ||
|
|
555a49d66e | ||
|
|
5a7fe6b4a7 | ||
|
|
0e54780377 | ||
|
|
7fc052ce19 | ||
|
|
a59a0151fb | ||
|
|
fce34301f9 | ||
|
|
1f3f6cc7b8 | ||
|
|
565fb615bc | ||
|
|
a7c246cec1 | ||
|
|
1ddf9f6ac5 | ||
|
|
a9d5363799 | ||
|
|
e654dac578 | ||
|
|
8653f3f026 | ||
|
|
5fbb967941 | ||
|
|
f5387081e0 | ||
|
|
8024a61376 | ||
|
|
ad09470f48 | ||
|
|
bd0e328d5b | ||
|
|
2a1dae78ca | ||
|
|
848c693822 | ||
|
|
30c4d5dedb | ||
|
|
9adbb0e973 | ||
|
|
86e827e3f7 | ||
|
|
239cb02613 | ||
|
|
6f2652f2b6 | ||
|
|
d6c35c1ee7 | ||
|
|
fa0825885a | ||
|
|
fa5fea68b0 | ||
|
|
c02b0f2381 | ||
|
|
2f0ad6a22c | ||
|
|
0fa836fd45 | ||
|
|
11992dca9f | ||
|
|
574c4373b4 | ||
|
|
e932bef031 | ||
|
|
411a6bb819 | ||
|
|
8a0ac8b650 | ||
|
|
651596e8d5 | ||
|
|
5db9505f40 | ||
|
|
a9c14c80f0 | ||
|
|
c71c4e86f6 | ||
|
|
556827c818 | ||
|
|
2ce6f55d92 | ||
|
|
7afb1aef14 | ||
|
|
da7c8b42f2 | ||
|
|
dd3d0ad9ac | ||
|
|
49e38e1263 | ||
|
|
34987d3e8b | ||
|
|
3730d874c9 |
2
.gitignore
vendored
@@ -3,7 +3,7 @@ htdocs/conf/conf.php.old
|
||||
documents/
|
||||
custom/
|
||||
custom2/
|
||||
test/report/
|
||||
test/
|
||||
nbproject
|
||||
default.properties
|
||||
.settings/
|
||||
|
||||
84
.travis.yml
Normal file
@@ -0,0 +1,84 @@
|
||||
# This script is used by Travis CI to run automatically Continuous test integration
|
||||
# from Dolibarr GitHub repository.
|
||||
# Command run is phpunit
|
||||
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/
|
||||
|
||||
services:
|
||||
- memcached # will start memcached
|
||||
|
||||
# This will tell travis to run phpunit
|
||||
language: php
|
||||
php:
|
||||
- "5.3"
|
||||
- "5.4"
|
||||
|
||||
env:
|
||||
- DB=mysql
|
||||
# - DB=postgres
|
||||
|
||||
before_script:
|
||||
- echo Start travis
|
||||
- echo Current dir is `pwd`
|
||||
- echo Home dir is `echo ~`
|
||||
- echo Update composer
|
||||
# - ~/.phpenv/versions/$(phpenv version-name)/bin/composer.phar self-update
|
||||
- echo Create dir $(pwd)/htdocs/documents
|
||||
- sudo mkdir -p $(pwd)/htdocs/documents/admin/temp;
|
||||
- sudo touch $(pwd)/htdocs/documents/dolibarr.log;
|
||||
- sudo chmod a+rwx /home; sudo chmod a+rwx /home/travis; sudo chmod -R a+rwx /home/travis/build;
|
||||
- sudo chmod -R a+rwx $(pwd);
|
||||
- sudo chown -R www-data:travis $(pwd)/htdocs/documents;
|
||||
- find $(pwd)/htdocs/documents -type d -exec ls -alt {} \;
|
||||
- echo Edit php.ini file
|
||||
- echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
- echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
# - echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
- echo "zend_extension_ts = xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
- cat ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
- echo Init database
|
||||
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS myapp_test;' -U postgres; fi"
|
||||
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE myapp_test;' -U postgres; fi"
|
||||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'DROP DATABASE IF EXISTS myapp_test;'; fi"
|
||||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS myapp_test;'; fi"
|
||||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -D myapp_test < $(pwd)/dev/initdata/mysqldump_dolibarr_3.3.0.sql; fi"
|
||||
- echo Create config file htdocs/conf/conf.php
|
||||
- echo '<?php ' > htdocs/conf/conf.php
|
||||
- sh -c "if [ '$DB' = 'pgsql' ]; then echo '$'dolibarr_main_db_type=\'pgsql\'';' >> htdocs/conf/conf.php; fi"
|
||||
- sh -c "if [ '$DB' = 'mysql' ]; then echo '$'dolibarr_main_db_type=\'mysqli\'';' >> htdocs/conf/conf.php; fi"
|
||||
- echo '$'dolibarr_main_url_root=\'http://localhost/\'';' >> htdocs/conf/conf.php
|
||||
- echo '$'dolibarr_main_document_root=\'$(pwd)/htdocs\'';' >> htdocs/conf/conf.php
|
||||
- echo '$'dolibarr_main_data_root=\'$(pwd)/htdocs/documents\'';' >> htdocs/conf/conf.php
|
||||
- echo '$'dolibarr_main_db_host=\'localhost\'';' >> htdocs/conf/conf.php
|
||||
- echo '$'dolibarr_main_db_name=\'myapp_test\'';' >> htdocs/conf/conf.php
|
||||
- echo '$'dolibarr_main_db_user=\'travis\'';' >> htdocs/conf/conf.php
|
||||
- echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> htdocs/conf/conf.php
|
||||
- echo '?>' >> htdocs/conf/conf.php
|
||||
- echo Show conf.php content
|
||||
- cat htdocs/conf/conf.php
|
||||
- echo Install apache server
|
||||
- sudo apt-get update > /dev/null
|
||||
- sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-curl php5-mysql php5-pgsql php5-intl
|
||||
- sudo sed -i -e "s,/var/www,$(pwd)/htdocs,g" /etc/apache2/sites-available/default
|
||||
- echo Show default virtual host
|
||||
- sudo cat /etc/apache2/sites-available/default
|
||||
- sudo /etc/init.d/apache2 restart
|
||||
- wget http://localhost/
|
||||
- cat index.html
|
||||
|
||||
|
||||
|
||||
# Omitting "script:" will default to phpunit
|
||||
# use the $DB env variable to determine the phpunit.xml to use
|
||||
#script: phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/AllTests.php
|
||||
#script: phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/BuildDocTest.php
|
||||
#script: phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/WebservicesOtherTest.php
|
||||
script:
|
||||
# - phpcs -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ .
|
||||
- phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
||||
|
||||
after_script:
|
||||
# - echo Output dolibarr log file; cat $(pwd)/htdocs/documents/dolibarr.log
|
||||
- echo Output apache log file; sudo cat /var/log/apache2/error.log
|
||||
- echo End travis
|
||||
|
||||
64
COPYRIGHT
@@ -9,39 +9,36 @@ More information: http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
|
||||
Dolibarr uses some external libraries released under different licences. This is compatibility summary:
|
||||
|
||||
Composant Version License Compatible GPL Usage
|
||||
Composant Version License Compatible GPL Usage
|
||||
----------------------------------------------------------------------------
|
||||
PHP libraries:
|
||||
AdoDb-Date 0.21 Modified BSD License Yes Date convertion (not into rpm package)
|
||||
CKEditor 3.6.4 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
FPDI 1.4.2 Apache Software License 2.0 Yes PDF templates management (with FPDF_TPL 1.2)
|
||||
GeoIP 2004 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)
|
||||
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
|
||||
OdtPHP 1.0.1 GPL-2+ Yes Library to build/edit ODT files
|
||||
PHPExcel 1.7.6 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
||||
TCPDF 5.9.180 LGPL-3+ Yes PDF generation
|
||||
AdoDb-Date 0.21 Modified BSD License Yes Date convertion (not into rpm package)
|
||||
CKEditor 3.6.4 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
FPDI 1.4.2 Apache Software License 2.0 Yes PDF templates management (with FPDF_TPL 1.2)
|
||||
GeoIP 2004 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)
|
||||
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
|
||||
OdtPHP 1.0.1 GPL-2+ Yes Library to build/edit ODT files
|
||||
PHPExcel 1.7.6 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
TCPDF 5.9.180 LGPL-3+ Yes PDF generation
|
||||
|
||||
JS libraries:
|
||||
jQuery 1.8.2 MIT Licence Yes JS library
|
||||
jQuery UI 1.9.1 GPL and MIT Licence Yes JS library plugin UI
|
||||
jQuery blockUI 2.43 GPL and MIT Licence Yes JS library plugin blockUI (to use ajax popups)
|
||||
jQuery Colorpicker 1.1 MIT Licence Yes JS library for color picker for a defined list of colors
|
||||
jQuery DataTables 1.9.4 BSD Yes JS library for tables output
|
||||
jQuery FileUpload 5.0.3 GPL and MIT Licence Yes JS library to upload files
|
||||
jQuery Flot 0.7 MIT Licence Yes JS library to build graph
|
||||
jQuery JCrop 0.9.8 GPL and MIT Licence Yes JS library plugin Crop (to crop images)
|
||||
jQuery jeditable 1.7.1 GPL and MIT Licence Yes JS library plugin jeditable (to edit in place)
|
||||
jQuery jNotify 1.1.00 Apache Software License 2.0 Yes JS library plugin jNotify (to use ajax popups)
|
||||
jQuery jPicker 1.1.00 GPL and MIT Licence Yes JS library for color picker with not defined list of colors
|
||||
jQuery jqueryFileTree 1.0.1 GPL and MIT Licence Yes JS library for color picker with not defined list of colors
|
||||
jQuery jquerytreeview 1.4.1 MIT Licence Yes JS library for color picker with not defined list of colors
|
||||
jQuery Layout 1.3.0 GPL and MIT Licence Yes JS library plugin Layout (RC-29.15)
|
||||
jQuery Mobile 1.3 GPL and MIT Licence Yes JS library for smartphone (not used)
|
||||
jQuery TableDnD 0.5 GPL and MIT Licence Yes JS library plugin TableDnD (to reorder table rows)
|
||||
jQuery Timepicker 1.1.0 GPL and MIT Licence Yes JS library Timepicker addon for Datepicker
|
||||
jQuery Tiptip 1.3 GPL and MIT Licence Yes JS library for tooltips
|
||||
JSGantt 1.2 BSD Licence Yes JS library (to build Gantt reports)
|
||||
jQuery 1.8.2 MIT Licence Yes JS library
|
||||
jQuery UI 1.9.1 GPL and MIT Licence Yes JS library plugin UI
|
||||
jQuery Timepicker 1.1.0 GPL and MIT Licence Yes JS library Timepicker addon for Datepicker
|
||||
jQuery Colorpicker 1.1 MIT Licence Yes JS library for color picker for a defined list of colors
|
||||
jQuery DataTables 1.9.1 BSD Yes JS library for tables output
|
||||
jQuery Flot 0.7 MIT Licence Yes JS library to build graph
|
||||
jQuery FileUpload 5.0.3 GPL and MIT Licence Yes JS library to upload files
|
||||
jQuery JCrop 0.9.8 GPL and MIT Licence Yes JS library plugin Crop (to crop images)
|
||||
jQuery jeditable 1.7.1 GPL and MIT Licence Yes JS library plugin jeditable (to edit in place)
|
||||
jQuery jNotify 1.1.00 Apache Software License 2.0 Yes JS library plugin jNotify (to use ajax popups)
|
||||
jQuery blockUI 2.43 GPL and MIT Licence Yes JS library plugin blockUI (to use ajax popups)
|
||||
jQuery jPicker 1.1.00 GPL and MIT Licence Yes JS library for color picker with not defined list of colors
|
||||
jQuery Layout 1.3.0 GPL and MIT Licence Yes JS library plugin Layout (RC-29.15)
|
||||
jQuery TableDnD 0.5 GPL and MIT Licence Yes JS library plugin TableDnD (to reorder table rows)
|
||||
jQuery Mobile 1.3.0 GPL and MIT Licence Yes JS library for smartphone (not used)
|
||||
jQuery Tiptip 1.3 GPL and MIT Licence Yes JS library for tooltips
|
||||
JSGantt 1.2 BSD Licence Yes JS library (to build Gantt reports)
|
||||
|
||||
For licenses compatibility informations:
|
||||
http://www.fsf.org/licensing/licenses/index_html
|
||||
@@ -53,24 +50,20 @@ Copyright
|
||||
Copyright (C) 2013
|
||||
- Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
- Jean-François Ferry <jfefe@aternatik.fr>
|
||||
- Marcos García <marcosgdf@gmail.com>
|
||||
- Philippe Grand <philippe.grand@atoo-net.com>
|
||||
- Florian Henry <florian.henry@open-concept.pro>
|
||||
- Regis Houssin <regis.houssin@capnetworks.com>
|
||||
- Maxime Kohlhaas <mko@atm-consulting.fr>
|
||||
- Juanjo Menent <jmenent@2byte.es>
|
||||
|
||||
Copyright (C) 2012
|
||||
- Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
- Jean-François Ferry <jfefe@aternatik.fr>
|
||||
- Marcos García <marcosgdf@gmail.com>
|
||||
- Philippe Grand <philippe.grand@atoo-net.com>
|
||||
- Jean Heimburger <jean@tiaris.info>
|
||||
- Florian Henry <florian.henry@open-concept.pro>
|
||||
- Regis Houssin <regis.houssin@capnetworks.com>
|
||||
- Maxime Kohlhaas <mko@atm-consulting.fr>
|
||||
- Juanjo Menent <jmenent@2byte.es>
|
||||
- Nicolas Péré <nicolas@amarok2.net>
|
||||
|
||||
@@ -127,12 +120,11 @@ Copyright (C) 2005
|
||||
- Regis Houssin <regis.houssin@capnetworks.com>
|
||||
|
||||
Copyright (C) 2004
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
- Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
- Eric Seigne <erics@rycks.com>
|
||||
- Benoit Mortier <benoit.mortier@opensides.be>
|
||||
- Christophe Combelles <ccomb@free.fr>
|
||||
- Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
- Christophe Combelles <ccomb@free.fr>
|
||||
|
||||
Copyright (C) 2003
|
||||
- Jean-Louis Bergamo <jlb@j1b.org>
|
||||
|
||||
131
ChangeLog
@@ -2,110 +2,28 @@
|
||||
English Dolibarr ChangeLog
|
||||
--------------------------------------------------------------
|
||||
|
||||
***** ChangeLog for 3.4 compared to 3.3.* *****
|
||||
For users:
|
||||
- New: Can use ODS templates as document templates.
|
||||
- New: Add link to autofill/reset with quantity to ship when creating a
|
||||
delivery receipt.
|
||||
- New: Event into calendar use different colors for different users.
|
||||
- New: Support revenue stamp onto invoices.
|
||||
- New: Add a tab "consumption" on thirdparties to list products bought/sells.
|
||||
- New: Some performance enhancements.
|
||||
- New: Can attach files onto trip and expenses modules.
|
||||
- New: Add hidden option MAIN_PDF_TITLE_BACKGROUND_COLOR.
|
||||
- New: Merge tab customer and prospect.
|
||||
- New: Add ES formated address country rule.
|
||||
- New: Can define a hierarchical responsible on user and add a tree view to
|
||||
see hierarchy of users.
|
||||
- New: Can expand/collapse menus, categories and users list.
|
||||
- New: extra parameters are supported into ODT/ODS templates.
|
||||
- New: total per vat rate are available as tags for ODT/ODS templates.
|
||||
- New: Some part of interface use more CSS3 (ie: agenda)
|
||||
- New: [ task #707 ] Create option "ProfIdx is mandatory to validate a invoice".
|
||||
- New: Can define if we want to use VAT or not for subscriptions (foundation module).
|
||||
- New: Can define a default choice for "More action when recording a
|
||||
subscription" (foundation module).
|
||||
- New: Add link to check professional id for India.
|
||||
- New: [ task #731 ] Uniformize ref generation
|
||||
- New: [ task #748 ] Add a link "Dolibarr" into left menu
|
||||
- New: Script email_unpaid_invoices_to_representative accepts now a parameter "test"
|
||||
and a "late delay".
|
||||
- New: Can define different clicktodial setups for each user.
|
||||
- New: Add hidden option INVOICE_CAN_NEVER_BE_REMOVED.
|
||||
- New: Enhance agenda module to reach RFC2445 ("type" not enabled by default and add
|
||||
"busy" information).
|
||||
- New: Add module Opensurvey.
|
||||
- New: Default approver for holidays is set by default to hierchical parent.
|
||||
- First change to prepare feature "click to print" (IPP) for PDF.
|
||||
- New: [ task #350 ] Merge tab customer and prospect.
|
||||
- New: [ task #710 ] Add substitution into mailing send (and HTML is now valid).
|
||||
- New: [ task #711 ] Add combobox for contact, as done for product/thirdparty.
|
||||
- New: [ task #714 ] In Emailing module admin autogenerate security key of READRECEIPT.
|
||||
- New: [ task #743 ] GED : Add aministration option to disable autotree display.
|
||||
- New: [ task #767 ] Customer Address fallback when a contact doesn't have an address.
|
||||
- New: [ task #768 ] WYSIWYG for all mails.
|
||||
- New: [ task #773 ] Add Project document in GED(ECM) modules.
|
||||
- New: [ task #783 ] Add more types for extra parameters (lists, phone, emails, checkbox,
|
||||
prices, radio).
|
||||
- New: [ task #798 ] Add range limit date on product/services as it is done on order
|
||||
and invoice.
|
||||
- New: [ task #814 ] Add extrafield feature for projects ands tasks.
|
||||
- New: [ task #770 ] Add ODT document generation for Projects module.
|
||||
- New: [ task #741 ] Add intervention box.
|
||||
- New: [ task #826 ] Optionnal increase stock when deleting an invoice already validated.
|
||||
- New: [ task #823 ] Shipping_validate email notification.
|
||||
- New: [ task #900 ] Review code of ficheinter.class.php
|
||||
- Fix: [Bug #958] LocalTax2 for Spain fails on Suppliers
|
||||
- Fix: [ bug #972 ] Auto completion contact field do not take account the min caract number before search
|
||||
- Fix: [ bug #971 ] html.form.class.php select_contact with autocomplete do not exclude id from exclude array
|
||||
|
||||
For translators:
|
||||
- Update language files.
|
||||
|
||||
For developers:
|
||||
- System of menu managers has been rewritten to reduce code to do same things.
|
||||
- An external module can force its theme.
|
||||
- Add function dol_set_focus('#xxx').
|
||||
- A mymodule can bring its own core/modules/mymodule/modules_mymodule.php file.
|
||||
- Removed not used libraries.
|
||||
- More web services.
|
||||
- Renamed some database fields, code variables and parameters from french to english.
|
||||
- First change to manage margins on contracts.
|
||||
- Add hook getFormMail.
|
||||
- Function plimit of databases drivers accept -1 as value (it means default value set
|
||||
into conf->liste_limit).
|
||||
- New: Add option dol_hide_topmenu, dol_hide_leftmenu, dol_optimize_smallscreen,
|
||||
dol_no_mouse_hover and dol_use_jmobile onto login page (to support different terminal).
|
||||
- New: dol_syslog method accept a suffix to use different log files for log.
|
||||
- New: Type of fields are received by export format handlers.
|
||||
- New: when adding an action, we can define a free code to tag it for a specific need.
|
||||
- New: Enhance Dolibarr migration process to include migration script of external
|
||||
modules.
|
||||
- New: [ task #811 ] Uniformanize note field.
|
||||
|
||||
|
||||
WARNING: If you used external modules, some of them may need to be upgraded due to:
|
||||
- Fields of classes were renamed to be normalized (nom, prenom, cp, ville, adresse, tel
|
||||
were renamed into lastname, firstname, zip, town, address, phone).
|
||||
This may also be true for some fields into web services.
|
||||
- If module use hook pdf_writelinedesc, module may have to add return 1 at end of
|
||||
function to keep same behaviour.
|
||||
|
||||
TODO:
|
||||
backport commit 53672dff75f4fdaeeed037ff9d15f860968022ca to fix confirm with jmobile
|
||||
backport commit 384e3812eb73a15adafb472cacfb93397a54459b to fix W3C/edit contract
|
||||
|
||||
***** ChangeLog for 3.3.5 compared to 3.3.4 *****
|
||||
|
||||
- Fix: Change to make debian package ok despite removal of ckeditor.
|
||||
- Fix: jcrop file to match debian rules
|
||||
- Fix: Add missing country UK.
|
||||
- Fix: Minor fix into package.
|
||||
- Fix: Add missing label on project field.
|
||||
|
||||
***** ChangeLog for 3.3.4 compared to 3.3.3 *****
|
||||
|
||||
- Fix: [ bug #1001 ] Social Contribution : State not correct
|
||||
- Fix: Better management of pdf generation when tcpdf is not available.
|
||||
- Fix: Change to be more debian compliant natively.
|
||||
|
||||
***** ChangeLog for 3.3.3 compared to 3.3.2 *****
|
||||
|
||||
- Fix: [ bug #903 ] Fatal error: Call to undefined function dol_get_first_day() in htdocs/commande/liste.php
|
||||
- Fix: [ bug #934 ] Error on proformat invoice creation (pgsql)
|
||||
- Fix: [ bug #947 ] Can't create proposal lines with unit price = 0
|
||||
|
||||
***** ChangeLog for 3.3.2 compared to 3.3.1 *****
|
||||
|
||||
- Fix: Dutch (nl_NL) translation
|
||||
- Generalize fix: file with a specific mask not found, again
|
||||
- Fix: translations and BILL_SUPPLIER_BUILDDOC trigger
|
||||
@@ -136,6 +54,7 @@ backport commit 384e3812eb73a15adafb472cacfb93397a54459b to fix W3C/edit contrac
|
||||
- Fix: [ bug #806 ] Tasks are ordered alphabetically instead of chronological order
|
||||
|
||||
***** ChangeLog for 3.3.1 compared to 3.3 *****
|
||||
|
||||
- Fix: [ bug #733 ] Mass emailing tools do not support <style HTML tag
|
||||
- Fix: Package for launchpad
|
||||
- Fix: [ bug #736 ] Missing column in llx_c_chargesociales
|
||||
@@ -143,7 +62,9 @@ backport commit 384e3812eb73a15adafb472cacfb93397a54459b to fix W3C/edit contrac
|
||||
- Fix: [ bug #762 ] Bad profit calculation in Reporting
|
||||
- Fix: bug dictionnary with wrong prefix table
|
||||
|
||||
***** ChangeLog for 3.3 compared to 3.2.* *****
|
||||
|
||||
|
||||
***** ChangeLog for 3.3 compared to 3.2.3 *****
|
||||
For users:
|
||||
- New: Add holiday module, to declare and follow holidays of your employees.
|
||||
- New: Add margin management module.
|
||||
@@ -321,7 +242,7 @@ Dolibarr license has also been updated from GPLv2+ to GPLv3+.
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 3.2.0 compared to 3.1.* *****
|
||||
***** ChangeLog for 3.2.0 compared to 3.1.3 *****
|
||||
WARNING: PHP lower than 5.x are no more supported.
|
||||
WARNING: Because of a major datastructure change onto supplier prices tables, be aware
|
||||
to make a backup of your database before making upgrade.
|
||||
@@ -562,7 +483,7 @@ For translators:
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 3.0 compared to 2.9.* *****
|
||||
***** ChangeLog for 3.0 compared to 2.9 *****
|
||||
|
||||
For users:
|
||||
- New: Can edit date of cheque receipts.
|
||||
@@ -658,7 +579,7 @@ For developers:
|
||||
- Qual: Removed deprecated code.
|
||||
|
||||
|
||||
***** ChangeLog for 2.9 compared to 2.8.* *****
|
||||
***** ChangeLog for 2.9 compared to 2.8 *****
|
||||
|
||||
For users:
|
||||
- New: POS module allow to choose which warehouse to use.
|
||||
@@ -776,7 +697,7 @@ For users:
|
||||
- Fix: bug #29526 : Numérotation Proposition Incorrecte après duplication
|
||||
|
||||
|
||||
***** ChangeLog for 2.8 compared to 2.7.* *****
|
||||
***** ChangeLog for 2.8 compared to 2.7 *****
|
||||
|
||||
For users:
|
||||
- New: Support note on trips module
|
||||
@@ -840,7 +761,7 @@ For users:
|
||||
- Fix: Update member photo.
|
||||
|
||||
|
||||
***** ChangeLog for 2.7 compared to 2.6.* *****
|
||||
***** ChangeLog for 2.7 compared to 2.6 *****
|
||||
|
||||
For users:
|
||||
- New: Add a print icon to show a page to print without menus.
|
||||
@@ -939,7 +860,7 @@ For developers:
|
||||
- All install files are now in same directory /install.
|
||||
|
||||
|
||||
***** ChangeLog for 2.6 compared to 2.5.* *****
|
||||
***** ChangeLog for 2.6 compared to 2.5 *****
|
||||
|
||||
For users:
|
||||
- New: Add filter on status in emailing selector for Dolibarr users.
|
||||
@@ -1022,7 +943,7 @@ For developers:
|
||||
- First change for future geoip module.
|
||||
|
||||
|
||||
***** ChangeLog for 2.5 compared to 2.4.* *****
|
||||
***** ChangeLog for 2.5 compared to 2.4 *****
|
||||
|
||||
For users:
|
||||
- Sessions timeout can be configured to overwrite PHP setup.
|
||||
@@ -1086,7 +1007,7 @@ For developers:
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 2.4 compared to 2.2.* *****
|
||||
***** ChangeLog for 2.4 compared to 2.2 *****
|
||||
|
||||
For users:
|
||||
- Add a calendar module (module agenda) with ical/vcal/rss export.
|
||||
@@ -1141,7 +1062,7 @@ For developers:
|
||||
Windows with Apache and Mysql included.
|
||||
|
||||
|
||||
***** ChangeLog for 2.2 compared to 2.1.* *****
|
||||
***** ChangeLog for 2.2 compared to 2.1 *****
|
||||
|
||||
- Add more statistics on main page.
|
||||
- Add option to add message on login page.
|
||||
@@ -1175,7 +1096,7 @@ For developers:
|
||||
- Can drag and drop boxes on main page.
|
||||
|
||||
|
||||
***** ChangeLog for 2.1 compared to 2.0.* *****
|
||||
***** ChangeLog for 2.1 compared to 2.0.1 *****
|
||||
|
||||
- Added a better installer.
|
||||
- Support user and groups permissions.
|
||||
@@ -1246,7 +1167,7 @@ Minor bug fixes
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 2.0 compared to 1.0.* *****
|
||||
***** ChangeLog for 2.0 compared to 1.0 *****
|
||||
|
||||
ChangeLog file size is so important, that it is not included inside Dolibarr
|
||||
package. You can find it at www.dolibarr.org
|
||||
|
||||
3
README
@@ -107,7 +107,7 @@ Other modules:
|
||||
- ClickToDial phone numbers
|
||||
- RSS
|
||||
|
||||
Miscellaneous:
|
||||
Miscellanous:
|
||||
- Multi-user, with several permissions levels for each feature.
|
||||
- Serveral menu managers (can be used by internal users, as a back-office,
|
||||
with a particular menu, or by external users, as a front-office, with
|
||||
@@ -132,6 +132,7 @@ This is features that Dolibarr does not support completely yet:
|
||||
- No accountancy (only bank management).
|
||||
- Dolibarr manage one currency at once (mono-currency).
|
||||
- Dolibarr manage one company/foundation (mono-company). If you want to manage several companies or foundations, you must install several time the software (on same server or not). Another solution is to extend Dolibarr with the addon Module MultiCompany that allows to manage several companies in one Dolibarr instance (one database but with a logical isolation of datas).
|
||||
- Does not support double VAT (Federal / provincial) for Canada.
|
||||
- Dolibarr does not contains Payroll module.
|
||||
- Tasks on module project can't have dependencies between each other.
|
||||
- Dolibarr does not include any Webmail.
|
||||
|
||||
28
README-FR
@@ -78,34 +78,35 @@ IV - CE QUE DOLIBARR PEUT FAIRE
|
||||
-------------------------------
|
||||
|
||||
Modules principaux:
|
||||
- Annuaires des prospects et/ou client et/ou fournisseurs
|
||||
- Gestion de catalogue de produits et services
|
||||
- Gestion de stock
|
||||
- Gestion des comptes bancaires
|
||||
- Agenda partagé
|
||||
- Annuaires des prospects et/ou client et/ou fournisseurs
|
||||
- Annuaires des contacts
|
||||
- Gestion des actions/taches avec un agenda intégré (ou lien avec webcalendar)
|
||||
- Gestion des commandes
|
||||
- Gestion des devis, propositions commerciales
|
||||
- Gestion des factures clients et fournisseurs
|
||||
- Gestion des propositions commerciales
|
||||
- Gestion de contrats de services
|
||||
- Gestion des factures clients et fournisseurs
|
||||
- Gestion des paiements
|
||||
- Gestion des virements bancaires
|
||||
- Gestion des expéditions
|
||||
- GED (Gestion Electronique de Documents)
|
||||
- EMailings de masse
|
||||
- Réalisation de sondages
|
||||
- Point de vente/Caisse enregistreuse
|
||||
|
||||
Autres modules:
|
||||
- Gestion de marque-pages
|
||||
- Gestion des promesses de dons
|
||||
- Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM)
|
||||
- Gestion des adhérents d'association
|
||||
- Gestion des dons
|
||||
- Gestion de marque-pages
|
||||
- Agenda
|
||||
- Point de vente/Caisse enregistreuse
|
||||
- Fonctions d'EMailing de masses vers les clients, prospect ou utilisateurs Dolibarr
|
||||
- Rapports
|
||||
- Imports/Exports des données
|
||||
- Fonctions d'exports
|
||||
- Connectivité LDAP
|
||||
- Export PDF de tous les éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
|
||||
- De nombreuses autres fonctionnalités issues de modules officiels ou non (AWStats, Bittorrent, Gravatar, Google, Webcalendar...)
|
||||
|
||||
Divers:
|
||||
Miscellanous:
|
||||
- Application multi-utilisateurs avec différents niveaux de permissions par module.
|
||||
- Plusieurs gestionnaires de menus (possibilité de différencier les menus pour les utilisateurs internes ou externes comme les clients ou fournisseurs).
|
||||
- Application simple à utiliser.
|
||||
@@ -121,7 +122,8 @@ V - CE QUE DOLIBARR NE PEUT PAS FAIRE (TACHES A FAIRE)
|
||||
Voici un liste de fonctionnalites pas encore gérées par Dolibarr:
|
||||
- Pas de compta analytique (uniquement gestion de trésorerie).
|
||||
- Dolibarr ne gère qu'une seule monnaie à la fois (mono-devise).
|
||||
- Dolibarr ne gère en standard qu'une société/institution/association mère (mono-société). Pour en gérer plusieurs (comme vos filiales), il faut, soit faire plusieurs installations de Dolibarr, soit installer le module MultiCompany qui permet de gérer n société/institutions/associations dans une seule instance par une isolation logique des données.
|
||||
- Dolibarr ne gère en standard qu'une société/institution/association (mono-société). Pour en gérer plusieurs (comme vos filiales), il faut, soit faire plusieurs installations de Dolibarr, soit installer le module MultiCompany qui permet de gérer n société/institutions/associations dans une seule instance par une isolation logique des données.
|
||||
- Ne gère pas la double tva (Fédérale / provinciale) du canada.
|
||||
- Dolibarr ne contient pas de module de Gestion de la paie.
|
||||
- Les taches du module de gestion de projets n'ont pas de dépendance entre elle.
|
||||
- Dolibarr ne contient pas de Webmail.
|
||||
|
||||
33
README.md
@@ -75,37 +75,35 @@ See ChangeLog file found into package.
|
||||
|
||||
### Main modules/features:
|
||||
|
||||
- Customers, Prospects or Suppliers directory
|
||||
- Products and services catalog
|
||||
- Customers, Prospects or Suppliers directory
|
||||
- Address book
|
||||
- Stock management
|
||||
- Bank accounts management
|
||||
- Orders management with PDF export
|
||||
- Commercial proposals management
|
||||
- Commercial proposals management with PDF export
|
||||
- Contracts management
|
||||
- Invoices management
|
||||
- Invoices management with PDF export
|
||||
- Payments management
|
||||
- Standing orders management
|
||||
- Shipping management
|
||||
- Agenda with ical,vcal export for third tools integration
|
||||
- ECM (Electronic Content Management)
|
||||
- Foundations members management
|
||||
- Employee's holidays management
|
||||
- Mass emailing
|
||||
- Realize surveys
|
||||
- Point of Sale
|
||||
- EMailings
|
||||
- Agenda with ical,vcal export for third tools integration
|
||||
- Management of foundation members
|
||||
- Donation management
|
||||
|
||||
### Other modules:
|
||||
|
||||
- Bookmarks management
|
||||
- Donations management
|
||||
- Reporting
|
||||
- Data export/import tools
|
||||
- Can reports Dolibarr events inside Webcalendar or Phenix
|
||||
- Data export tools
|
||||
- LDAP connectivity
|
||||
- Third parties or products categories
|
||||
- ClickToDial phone numbers
|
||||
- RSS integration
|
||||
- RSS
|
||||
|
||||
### Miscellaneous:
|
||||
### Miscellanous:
|
||||
|
||||
- Multi-user, with several permissions levels for each feature.
|
||||
- Serveral menu managers (can be used by internal users, as a back-office, with a particular menu, or by external users, as a front-office, with another menu and permissions).
|
||||
@@ -125,10 +123,11 @@ See ChangeLog file found into package.
|
||||
|
||||
This is features that Dolibarr does not support completely yet:
|
||||
|
||||
- No double party accountancy (only bank management).
|
||||
- No accountancy (only bank management).
|
||||
- Dolibarr manage one currency at once (mono-currency).
|
||||
- Dolibarr manage one master company/foundation (mono-company). If you want to manage several companies or foundations, you must install several time the software (on same server or not). Another solution is to extend Dolibarr with the addon Module MultiCompany that allows to manage several companies in one Dolibarr instance (one database but with a logical isolation of datas).
|
||||
- Dolibarr manage one company/foundation (mono-company). If you want to manage several companies or foundations, you must install several time the software (on same server or not). Another solution is to extend Dolibarr with the addon Module MultiCompany that allows to manage several companies in one Dolibarr instance (one database but with a logical isolation of datas).
|
||||
- Does not support double VAT (Federal / provincial) for Canada.
|
||||
- Dolibarr does not contains Payroll module.
|
||||
- Tasks on module project can't have dependencies between each other.
|
||||
- Dolibarr does not include any Webmail.
|
||||
- Dolibarr can't do coffee (not yet).
|
||||
- Dolibarr can't do coffee (not yet).
|
||||
70
build/README
@@ -7,10 +7,27 @@ All sub-directories of "build" directory contains files required to build
|
||||
automatically Dolibarr packages.
|
||||
There are several tools:
|
||||
|
||||
|
||||
|
||||
- To build full Dolibarr packages, launch the script
|
||||
> Edit version in makepack-dolibarr.pl file.
|
||||
> Launch command perl makepack-dolibarr.pl
|
||||
|
||||
Note: Prerequisites to build tgz, debian, rpm package
|
||||
> apt-get install tar dpkg dpatch p7zip-full rpm zip
|
||||
|
||||
Note: Prerequisites to build autoexe DoliWamp package:
|
||||
> Install InnoSetup
|
||||
For example by running isetup-5.3.9.exe (http://www.jrsoftware.org)
|
||||
> Install WampServer into "C:\Program Files\Wamp"
|
||||
For example by running wampserver2.2e-php5.4.3-httpd-2.4.2-mysql5.5.24-x64.exe (http://www.wampserver.com)
|
||||
> Install WampServer addon to have versions: Apache2.2.11, Mysql5.0.45, Php5.3.0
|
||||
For example by running WampServer2-APACHE2211.exe (http://www.wampserver.com)
|
||||
For example by running WampServer2-MYSQL5045.exe (http://www.wampserver.com)
|
||||
For example by running WampServer2-PHP530.exe (http://www.wampserver.com)
|
||||
> To build from Windows (running from makepack-dolibarr.pl script is however
|
||||
recommanded), open file build/exe/doliwamp.iss and click on button "Compile".
|
||||
The .exe file will be build into directory build.
|
||||
|
||||
- To build a translaction package, launch the script
|
||||
> perl makepack-dolibarrlang.pl
|
||||
|
||||
@@ -20,17 +37,6 @@ There are several tools:
|
||||
- To build a package for a module, launch the script
|
||||
> perl makepack-dolibarrmodule.pl
|
||||
|
||||
- To build an autoexe DoliWamp package:
|
||||
> Install InnoSetup (http://www.jrsoftware.org)
|
||||
> Install WampServer into "C:\Program Files\Wamp" (http://www.wampserver.com)
|
||||
> Install WampServer addon to have versions:
|
||||
Apache2.2.6, Mysql5.0.45, Php5.2.5
|
||||
> Modify file build/exe/doliwamp.iss to change variable SourceDir
|
||||
with value of Dolibarr repository.
|
||||
> Modify AppVerName and OutputBaseFilename.
|
||||
> Launch innosetup, open file build/exe/doliwamp.iss and click on
|
||||
button "Compile". The .exe file will be build into directory build.
|
||||
|
||||
- To build developper documentation, launch the script
|
||||
> perl dolybarr-doxygen-build.pl
|
||||
|
||||
@@ -43,24 +49,33 @@ generated packages will not contains this "build" directory.
|
||||
|
||||
We can find in "build", following sub-directories:
|
||||
|
||||
* deb:
|
||||
* aps:
|
||||
To build APS package.
|
||||
|
||||
* debian:
|
||||
To build Debian package.
|
||||
|
||||
* rpm:
|
||||
To build Redhat or Mandrake package.
|
||||
* dmg:
|
||||
To build Mac OS package (not ready yet).
|
||||
|
||||
* tgz:
|
||||
To build a tgz package.
|
||||
* doap:
|
||||
To build Doap descriptor to promote/describe Dolibarr releases.
|
||||
|
||||
* doxygen:
|
||||
Dir with config file to build doxygen documentation.
|
||||
|
||||
* exe:
|
||||
To build exe package for Windows that distribute Dolibarr sources or
|
||||
to build the complete DoliWamp package.
|
||||
|
||||
* tgz:
|
||||
To build a zip package.
|
||||
* launchpad:
|
||||
Doc file to explain how to use launchpad.
|
||||
|
||||
* doap:
|
||||
To build Doap descriptor to promote/describe Dolibarr releases.
|
||||
* live:
|
||||
Doc file to explain how to create a demo live CD.
|
||||
|
||||
* obs:
|
||||
Doc file to explain how to push release onto OBS.
|
||||
|
||||
* pad:
|
||||
To build a PAD file descriptor to promote/describe Dolibarr releases.
|
||||
@@ -68,5 +83,14 @@ To build a PAD file descriptor to promote/describe Dolibarr releases.
|
||||
* patch:
|
||||
Script file to generate a patch file to distribute a Dolibarr mod.
|
||||
|
||||
* dmg:
|
||||
To build dmg DoliMamp package for Mac OS X
|
||||
* perl:
|
||||
Tool to install dolibarr when using virtualmin pro
|
||||
|
||||
* rpm:
|
||||
To build Redhat, Opensuse or Mandriva package.
|
||||
|
||||
* tgz:
|
||||
To build a tgz package.
|
||||
|
||||
* zip:
|
||||
To build a zip package.
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
dolibarr (3.4.0+nmu1) unstable; urgency=low
|
||||
dolibarr (3.3.5) unstable; urgency=low
|
||||
|
||||
* Non-maintainer upload.
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
closes: bug#634783
|
||||
|
||||
-- Dolibarr team <contact@dolibarr.org> Mon, 22 Apr 2013 12:00:00 +0100
|
||||
|
||||
# For a changelog file dedicated to end users, see /usr/share/doc/dolibarr/ChangeLog.gz
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 30 Dec 2013 12:00:00 +0100
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Source: dolibarr
|
||||
Maintainer: Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
Maintainer: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
|
||||
Uploaders: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
|
||||
Standards-Version: 3.9.2
|
||||
Section: web
|
||||
Priority: optional
|
||||
@@ -13,7 +14,6 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
|
||||
libphp-adodb,
|
||||
libnusoap-php,
|
||||
libphp-pclzip,
|
||||
libfpdi-php, libfpdf-tpl-php, php-fpdf,
|
||||
libjs-jquery, libjs-jquery-ui, libjs-flot, ckeditor,
|
||||
ttf-dejavu-core,
|
||||
xdg-utils,
|
||||
@@ -59,4 +59,4 @@ Description: Web based software to manage a small company or foundation
|
||||
PDF exports,
|
||||
And a lot of more modules...
|
||||
.
|
||||
You can also add third parties external modules or develop yours.
|
||||
You can also add third parties external modules or develop yours.
|
||||
@@ -1,7 +1,7 @@
|
||||
Format: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?revision=174
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: Dolibarr
|
||||
Upstream-Contact: Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
Source: git@github.com:Dolibarr/dolibarr.git
|
||||
Source: http://sourceforge.net/projects/dolibarr/files/
|
||||
|
||||
Files: *
|
||||
Copyright: 2002-2009, Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
@@ -55,12 +55,129 @@ License: GPL-3+
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
License version 3 can be found in the file
|
||||
`/usr/share/common-licenses/GPL-3'.
|
||||
|
||||
Files: htdocs/includes/adodbtime/*
|
||||
Copyright: 2003-2005, John Lim
|
||||
unknown, jackbbs
|
||||
License: BSD
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
.
|
||||
Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
.
|
||||
Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
.
|
||||
Neither the name of the John Lim nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
Comment:
|
||||
Those files are not shipped in the binary package since we use
|
||||
the library as packaged in "libphp-adodb".
|
||||
|
||||
Files: htdocs/includes/ckeditor/*
|
||||
Copyright: 2003-2012 CKSource - Frederico Knabben
|
||||
License: GPL-2+
|
||||
The ckeditor is tripple licensed under the GNU General Public License (GPL),
|
||||
GNU Lesser General Public License (LGPL), and Mozilla Public License (MPL).
|
||||
In Debian, it is distributed under the GNU General Public License (GPL).
|
||||
.
|
||||
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/>.
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General Public License
|
||||
can be found in /usr/share/common-licenses/GPL-2 file.
|
||||
Comment:
|
||||
Sources for all minified javascript libraries are available in same directory
|
||||
than minified version (.min.js), except for ckeditor whose sources are files
|
||||
ckeditor_basic_source.js, ckeditor_source.js and files into directory _source.
|
||||
Those files are not shipped in the binary package since we use the
|
||||
library as packaged in "ckeditor".
|
||||
|
||||
Files: htdocs/includes/fonts/*
|
||||
Copyright: 2003, Bitstream Inc
|
||||
unknown, Gavin Graham
|
||||
License: other
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the fonts accompanying this license ("Fonts") and associated
|
||||
documentation files (the "Font Software"), to reproduce and distribute
|
||||
the Font Software, including without limitation the rights to use,
|
||||
copy, merge, publish, distribute, and/or sell copies of the Font
|
||||
Software, and to permit persons to whom the Font Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
.
|
||||
The above copyright and trademark notices and this permission notice
|
||||
shall be included in all copies of one or more of the Font Software
|
||||
typefaces.
|
||||
.
|
||||
The Font Software may be modified, altered, or added to, and in
|
||||
particular the designs of glyphs or characters in the Fonts may be
|
||||
modified and additional glyphs or characters may be added to the
|
||||
Fonts, only if the fonts are renamed to names not containing either
|
||||
the words "Bitstream" or the word "Vera".
|
||||
.
|
||||
This License becomes null and void to the extent applicable to Fonts
|
||||
or Font Software that has been modified and is distributed under the
|
||||
"Bitstream Vera" names.
|
||||
.
|
||||
The Font Software may be sold as part of a larger software package but
|
||||
no copy of one or more of the Font Software typefaces may be sold by
|
||||
itself.
|
||||
.
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
|
||||
BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL,
|
||||
OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT
|
||||
SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
.
|
||||
Except as contained in this notice, the names of Gnome, the Gnome
|
||||
Foundation, and Bitstream Inc., shall not be used in advertising or
|
||||
otherwise to promote the sale, use or other dealings in this Font
|
||||
Software without prior written authorization from the Gnome Foundation
|
||||
or Bitstream Inc., respectively. For further information, contact:
|
||||
fonts at gnome dot org.
|
||||
Comments:
|
||||
Those files are not shipped in the binary package as we
|
||||
configure Dolibarr to use Dejavu fonts from "fonts-dejavu-core".
|
||||
|
||||
Files: docs/images/*
|
||||
Copyright: Laurent Destailleur
|
||||
License: CC-BY-SA-3.0
|
||||
You are free:
|
||||
to Share (to copy, distribute and transmit the work) and
|
||||
to Remix (to adapt the work) under the following conditions:
|
||||
.
|
||||
Attribution - You must attribute the work in the manner specified by the
|
||||
author or licensor (but not in any way that suggests that they endorse you
|
||||
or your use of the work).
|
||||
.
|
||||
Share Alike - If you alter, transform, or build upon this work, you may
|
||||
distribute the resulting work only under the same, similar or a compatible
|
||||
license.
|
||||
.
|
||||
For more information, see http://creativecommons.org/licenses/by-sa/3.0/
|
||||
|
||||
Files: htdocs/includes/fpdi/*
|
||||
Copyright: FPDFI team
|
||||
Copyright: 2004-2011 Setasign - Jan Slabon
|
||||
License: GPL-2+
|
||||
This program is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public
|
||||
@@ -80,11 +197,35 @@ License: GPL-2+
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
Comment:
|
||||
Those files are not shipped in the binary package as we
|
||||
configure Dolibarr to use the library packaged in "libfpdi-php".
|
||||
|
||||
Files: htdocs/includes/geoip/*
|
||||
Copyright: 2007 MaxMind LLC
|
||||
License: LGPL-2.1+
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the full text of the GNU Lesser General Public
|
||||
License version 2.1 can be found in the file
|
||||
`/usr/share/common-licenses/LGPL-2.1'.
|
||||
|
||||
Files: htdocs/includes/jquery/*
|
||||
Copyright: JQuery team
|
||||
License: MIT or GPL-2+
|
||||
License: GPL-2+ or MIT
|
||||
=== GPL-2+ LICENSE NOTICE ===
|
||||
.
|
||||
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
|
||||
@@ -104,6 +245,8 @@ License: MIT or GPL-2+
|
||||
License version 2 can be found in the file
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
.
|
||||
=== MIT LICENSE ===
|
||||
.
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
@@ -121,13 +264,19 @@ License: MIT or GPL-2+
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
Comment:
|
||||
JQuery itself is not shipped in the binary package, instead Dolibarr is
|
||||
configured to use the packaged version from "libjs-jquery" and
|
||||
"libjs-jquery-ui". Most of the plugins are shipped though.
|
||||
|
||||
|
||||
Files: htdocs/includes/jquery/plugins/flot/*
|
||||
Copyright: Flot team
|
||||
License: Public Domain
|
||||
This work is not subject to copyright in any jurisdiction
|
||||
|
||||
Comment:
|
||||
Those files are not shipped in the binary package because we configure
|
||||
Dolibarr to use the files provided by "libjs-flot".
|
||||
|
||||
Files: htdocs/includes/jsgantt/*
|
||||
Copyright: JSGantt team
|
||||
@@ -151,12 +300,28 @@ License: GPL-2+
|
||||
License version 2 can be found in the file
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
|
||||
Files: htdocs/includes/phpexcel/*
|
||||
Copyright: PHPExcel team
|
||||
License: LGPL 2.1
|
||||
See http://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html
|
||||
|
||||
Files: htdocs/includes/nusoap/*
|
||||
Copyright: 2002-2010 NuSphere Corporation
|
||||
License: LGPL-2.1+
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the full text of the GNU Lesser General Public
|
||||
License version 2.1 can be found in the file
|
||||
`/usr/share/common-licenses/LGPL-2.1'.
|
||||
Comment:
|
||||
Those files are not shipped in the binary package since we
|
||||
configure Dolibarr to use the library provided in "libnusoap-php".
|
||||
|
||||
Files: htdocs/includes/odtphp/*
|
||||
Copyright: 2008, Julien Pauli
|
||||
@@ -182,8 +347,44 @@ License: GPL-2+
|
||||
License version 2 can be found in the file
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
Files: htdocs/includes/phpexcel/*
|
||||
Copyright: 2006-2011 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
License: LGPL-2.1+
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the full text of the GNU Lesser General Public
|
||||
License version 2.1 can be found in the file
|
||||
`/usr/share/common-licenses/LGPL-2.1'.
|
||||
|
||||
Files: htdocs/includes/tcpdf/*
|
||||
Copyright: TCPDF team
|
||||
License: LGPL 3.0
|
||||
See http://www.gnu.org/licenses/old-licenses/lgpl-3.0-standalone.html
|
||||
Copyright: 2002-2013 Nicola Asuni - Tecnick.com LTD
|
||||
License: LGPL-3.0+
|
||||
TCPDF is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
.
|
||||
TCPDF is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the complete text of the GNU Lesser General
|
||||
Public License version 3 can be found in "/usr/share/common-licenses/LGPL-3".
|
||||
Comment:
|
||||
Those files are not shipped in the binary package since we configure
|
||||
Dolibarr to use the library provided by "php-tcpdf".
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
debian/dolibarr.desktop usr/share/applications
|
||||
debian/dolibarr.xpm usr/share/pixmaps
|
||||
ChangeLog usr/share/doc/dolibarr
|
||||
README usr/share/doc/dolibarr
|
||||
doc/install usr/share/doc/dolibarr
|
||||
doc/user usr/share/doc/dolibarr
|
||||
|
||||
23
build/debian/get-orig-source.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
# Scan for new official sources and download file
|
||||
# run with debian/get-orig-source.sh [x.y.z]
|
||||
|
||||
tmpdir=$(mktemp -d)
|
||||
echo "tmpdir = $tmpdir"
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
uscan_opts="--download-version=$1"
|
||||
fi
|
||||
uscan --noconf --force-download --no-symlink --verbose --destdir=$tmpdir $uscan_opts
|
||||
|
||||
cd $tmpdir
|
||||
|
||||
tgzfile=$(echo *.tgz)
|
||||
version=$(echo "$tgzfile" | perl -pi -e 's/^dolibarr-//; s/\.tgz$//; s/_/./g; s/\+nmu1//; ')
|
||||
|
||||
cd - >/dev/null
|
||||
|
||||
mv $tmpdir/dolibarr-${version}.tgz ../
|
||||
echo "File ../dolibarr-${version}.tgz is ready for git-import"
|
||||
|
||||
rm -rf $tmpdir
|
||||
@@ -104,6 +104,7 @@ clean:
|
||||
rm -fr htdocs/includes/jquery/plugins/flot
|
||||
rm -fr htdocs/includes/jquery/plugins/jstree
|
||||
rm -fr htdocs/includes/jquery/plugins/lightbox
|
||||
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/PCLZip
|
||||
@@ -121,4 +122,4 @@ clean:
|
||||
dh $@
|
||||
|
||||
binary-arch:
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# watch control file for uscan
|
||||
#version=3
|
||||
#http://http://sourceforge.net/projects/dolibarr/files/Dolibarr%20installer%20for%20Debian-Ubuntu%20%28DoliDeb%29/ debian uupdate
|
||||
5
build/debian/watch
Normal file
@@ -0,0 +1,5 @@
|
||||
# watch control file for uscan
|
||||
version=3
|
||||
|
||||
#http://sf.net/dolibarr/dolibarr-(.+)\.tgz
|
||||
http://www.dolibarr.org/files/stable/standard/dolibarr-(.+)\.tgz
|
||||
@@ -31,7 +31,7 @@ PROJECT_NAME = dolibarr
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = 3.4.0
|
||||
PROJECT_NUMBER = 3.3.2
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# base path where the generated documentation will be put.
|
||||
@@ -611,7 +611,7 @@ RECURSIVE = YES
|
||||
# excluded from the INPUT source files. This way you can easily exclude a
|
||||
# subdirectory from a directory tree whose root is specified with the INPUT tag.
|
||||
|
||||
EXCLUDE = ../../build ../../dev ../../doc ../../document ../../documents ../../htdocs/conf/conf.php ../../htdocs/custom ../../htdocs/document ../../htdocs/documents ../../htdocs/includes
|
||||
EXCLUDE = ../../build ../../dev ../../doc ../../documents ../../htdocs/conf/conf.php ../../htdocs/includes ../../htdocs/document ../../htdocs/documents
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
|
||||
# directories that are symbolic links (a Unix filesystem feature) are excluded
|
||||
|
||||
@@ -48,8 +48,8 @@ If you want to build/test package locally:
|
||||
~eldy/dolibarr/stable
|
||||
or
|
||||
Use URL pattern (beta or stable):
|
||||
For stable: http://www.dolibarr.org/files/lastbuild/package_debian-ubuntu/dolibarr_x.z.*.tar.gz
|
||||
For beta: http://www.dolibarr.org/files/stable/package_debian-ubuntu/dolibarr_x.y.*.tar.gz
|
||||
http://www.dolibarr.org/files/lastbuild/package_debian-ubuntu/dolibarr_x.z.*.tar.gz
|
||||
http://www.dolibarr.org/files/stable/package_debian-ubuntu/dolibarr_x.y.*.tar.gz
|
||||
|
||||
- For Dev, you can also add link serie to GIT HEAD.
|
||||
- For beta and stable, you can init from command line
|
||||
@@ -71,6 +71,7 @@ If you want to build/test package locally:
|
||||
bzr commit -m "Description of change"
|
||||
bzr push
|
||||
|
||||
|
||||
# Init debian dir repository into launchpad (when repository for sources does not exist)
|
||||
#----------------------------------
|
||||
- Create debian directory and upload it onto bzr branch lp:~yourlogin/+junk/debian-[dev|beta|stable]
|
||||
@@ -111,26 +112,17 @@ If you want to build/test package locally:
|
||||
# bzr-builder format 0.3 deb-version {debupstream}-0~{revno}
|
||||
lp:dolibarr
|
||||
merge packaging lp:~yourlogin/+junk/debian-dev
|
||||
For beta:
|
||||
# bzr-builder format 0.3 deb-version {debupstream}-1~{revno}
|
||||
lp:dolibarr/beta
|
||||
merge packaging lp:~yourlogin/+junk/debian-beta
|
||||
For stable:
|
||||
# bzr-builder format 0.3 deb-version {debupstream}-2~{revno}
|
||||
# bzr-builder format 0.3 deb-version {debupstream}-0~{revno}
|
||||
lp:dolibarr/stable
|
||||
merge packaging lp:~yourlogin/+junk/debian-stable
|
||||
- Run command
|
||||
cd bzr
|
||||
bzr dailydeb dolibarr.recipe working-dir
|
||||
This will create a directory "working-dir" with dolibarr sources and will add sources from ~yourlogin/+junk/debian-[dev|beta|stable]
|
||||
This will create a directory "working-dir" with dolibarr sources and will add sources from ~yourlogin/+junk/debian-[dev|stable]
|
||||
- Test package sources
|
||||
sudo pbuilder build <working-dir>/<project>_<version>.dsc
|
||||
|
||||
List of recipes created
|
||||
https://code.launchpad.net/~eldy/+recipe/dolibarr-dev
|
||||
https://code.launchpad.net/~eldy/+recipe/dolibarr-beta
|
||||
https://code.launchpad.net/~eldy/+recipe/dolibarr-stable
|
||||
|
||||
|
||||
# To get/download package from PPA:
|
||||
#----------------------------------
|
||||
@@ -143,9 +135,6 @@ https://code.launchpad.net/~eldy/+recipe/dolibarr-stable
|
||||
For the development snapshot version:
|
||||
deb http://ppa.launchpad.net/yourlogin/dolibarr-dev/ubuntu precise main
|
||||
deb-src http://ppa.launchpad.net/yourlogin/dolibarr-dev/ubuntu precise main
|
||||
For the beta version:
|
||||
deb http://ppa.launchpad.net/yourlogin/dolibarr-beta/ubuntu precise main
|
||||
deb-src http://ppa.launchpad.net/yourlogin/dolibarr-beta/ubuntu precise main
|
||||
For the stable version:
|
||||
deb http://ppa.launchpad.net/yourlogin/dolibarr-stable/ubuntu precise main
|
||||
deb-src http://ppa.launchpad.net/yourlogin/dolibarr-stable/ubuntu precise main
|
||||
|
||||
@@ -2,43 +2,44 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# \file build/makepack-dolibarr.pl
|
||||
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
|
||||
# \author (c)2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
# \author (c)2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
#
|
||||
# This is list of constant you can set to have generated packages moved into a specific dir:
|
||||
#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'
|
||||
#DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'
|
||||
#DESTIMODULES='/media/HDDATA1_LD/Mes Sites/Web/Admin1/wwwroot/files/modules'
|
||||
#DESTIDOLIMEDBETARC='/media/HDDATA1_LD/Mes Sites/Web/DoliCloud/dolimed.com/htdocs/files/lastbuild'
|
||||
#DESTIDOLIMEDMODULES='/media/HDDATA1_LD/Mes Sites/Web/DoliCloud/dolimed.com/htdocs/files/modules'
|
||||
#DESTIDOLIMEDSTABLE='/media/HDDATA1_LD/Mes Sites/Web/DoliCloud/dolimed.com/htdocs/files/stable'
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
use Cwd;
|
||||
|
||||
$PROJECT="dolibarr";
|
||||
$MAJOR="3";
|
||||
$MINOR="4";
|
||||
$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
|
||||
|
||||
@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
||||
%REQUIREMENTPUBLISH=(
|
||||
"SF"=>"git ssh rsync"
|
||||
);
|
||||
%REQUIREMENTTARGET=( # Tool requirement for each package
|
||||
"SNAPSHOT"=>"tar",
|
||||
"TGZ"=>"tar",
|
||||
"ZIP"=>"7z",
|
||||
"XZ"=>"xz",
|
||||
"RPM_GENERIC"=>"rpmbuild",
|
||||
"RPM_FEDORA"=>"rpmbuild",
|
||||
"RPM_MANDRIVA"=>"rpmbuild",
|
||||
"RPM_OPENSUSE"=>"rpmbuild",
|
||||
"DEB"=>"dpkg",
|
||||
"APS"=>"zip",
|
||||
"EXEDOLIWAMP"=>"ISCC.exe"
|
||||
"EXEDOLIWAMP"=>"ISCC.exe",
|
||||
"SNAPSHOT"=>"tar"
|
||||
);
|
||||
%ALTERNATEPATH=(
|
||||
"7z"=>"7-ZIP",
|
||||
"makensis.exe"=>"NSIS"
|
||||
);
|
||||
|
||||
$FILENAME="$PROJECT";
|
||||
$FILENAMESNAPSHOT="$PROJECT-snapshot";
|
||||
$FILENAMETGZ="$PROJECT-$MAJOR.$MINOR.$BUILD";
|
||||
$FILENAMEZIP="$PROJECT-$MAJOR.$MINOR.$BUILD";
|
||||
$FILENAMERPM="$PROJECT-$MAJOR.$MINOR.$BUILD-$RPMSUBVERSION";
|
||||
$FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${BUILD}";
|
||||
$FILENAMEAPS="$PROJECT-$MAJOR.$MINOR.$BUILD.app";
|
||||
$FILENAMEEXEDOLIWAMP="DoliWamp-$MAJOR.$MINOR.$BUILD";
|
||||
if (-d "/usr/src/redhat") { $RPMDIR="/usr/src/redhat"; } # redhat
|
||||
if (-d "/usr/src/packages") { $RPMDIR="/usr/src/packages"; } # opensuse
|
||||
if (-d "/usr/src/RPM") { $RPMDIR="/usr/src/RPM"; } # mandrake
|
||||
@@ -57,6 +58,24 @@ $DIR||='.'; $DIR =~ s/([^\/\\])[\\\/]+$/$1/;
|
||||
|
||||
$SOURCE="$DIR/..";
|
||||
$DESTI="$SOURCE/build";
|
||||
$PUBLISH="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr";
|
||||
if (! $ENV{"DESTIBETARC"} || ! $ENV{"DESTISTABLE"})
|
||||
{
|
||||
print "Error: Missing environment variables.\n";
|
||||
print "You must define the environment variable DESTIBETARC and DESTISTABLE to point to the\ndirectories where you want to save the generated packages.\n";
|
||||
print "Example: DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'\n";
|
||||
print "Example: DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'\n";
|
||||
print "$PROG.$Extension aborted.\n";
|
||||
sleep 2;
|
||||
exit 1;
|
||||
}
|
||||
if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"})
|
||||
{
|
||||
print "Error: Directory of environment variable DESTIBETARC or DESTISTABLE does not exist.\n";
|
||||
print "$PROG.$Extension aborted.\n";
|
||||
sleep 2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
# Detect OS type
|
||||
# --------------
|
||||
@@ -64,7 +83,7 @@ if ("$^O" =~ /linux/i || (-d "/etc" && -d "/var" && "$^O" !~ /cygwin/i)) { $OS='
|
||||
elsif (-d "/etc" && -d "/Users") { $OS='macosx'; $CR=''; }
|
||||
elsif ("$^O" =~ /cygwin/i || "$^O" =~ /win32/i) { $OS='windows'; $CR="\r"; }
|
||||
if (! $OS) {
|
||||
print "$PROG.$Extension was not able to detect your OS.\n";
|
||||
print "Error: Can't detect your OS.\n";
|
||||
print "Can't continue.\n";
|
||||
print "$PROG.$Extension aborted.\n";
|
||||
sleep 2;
|
||||
@@ -93,7 +112,57 @@ if (! $TEMP || ! -d $TEMP) {
|
||||
$BUILDROOT="$TEMP/buildroot";
|
||||
|
||||
|
||||
my $copyalreadydone=0; # Use "-" before number of choice to avoid copy
|
||||
# Get version $MAJOR, $MINOR and $BUILD
|
||||
$result = open( IN, "<" . $SOURCE . "/htdocs/filefunc.inc.php" );
|
||||
if ( !$result ) { die "Error: Can't open descriptor file " . $SOURCE . "/htdocs/filefunc.inc.php\n"; }
|
||||
while (<IN>) {
|
||||
if ( $_ =~ /define\('DOL_VERSION','([\d\.]+)'\)/ ) { $PROJVERSION = $1; break; }
|
||||
}
|
||||
close IN;
|
||||
($MAJOR,$MINOR,$BUILD)=split(/\./,$PROJVERSION,3);
|
||||
if ($MINOR eq '') { die "Error can't detect version into ".$SOURCE . "/htdocs/filefunc.inc.php"; }
|
||||
|
||||
# Set vars for packaging
|
||||
$FILENAME = "$PROJECT";
|
||||
$FILENAMESNAPSHOT = "$PROJECT-snapshot";
|
||||
$FILENAMETGZ = "$PROJECT-$MAJOR.$MINOR.$BUILD";
|
||||
$FILENAMEZIP = "$PROJECT-$MAJOR.$MINOR.$BUILD";
|
||||
$FILENAMEXZ = "$PROJECT-$MAJOR.$MINOR.$BUILD";
|
||||
$FILENAMEDEB = "see later";
|
||||
$FILENAMEAPS = "$PROJECT-$MAJOR.$MINOR.$BUILD.app";
|
||||
$FILENAMEEXEDOLIWAMP = "DoliWamp-$MAJOR.$MINOR.$BUILD";
|
||||
# For RPM
|
||||
$ARCH='noarch';
|
||||
$newbuild = $BUILD;
|
||||
$newbuild =~ s/(dev|alpha)/0.1.a/gi; # dev (fedora)
|
||||
$newbuild =~ s/beta/0.2.beta1/gi; # beta (fedora)
|
||||
$newbuild =~ s/rc./0.3.rc1/gi; # rc (fedora)
|
||||
if ($newbuild !~ /-/) { $newbuild.='-0.3'; } # finale (fedora)
|
||||
#$newbuild =~ s/(dev|alpha)/0/gi; # dev
|
||||
#$newbuild =~ s/beta/1/gi; # beta
|
||||
#$newbuild =~ s/rc./2/gi; # rc
|
||||
#if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
|
||||
$REL1 = $newbuild; $REL1 =~ s/-.*$//gi;
|
||||
if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; }
|
||||
$FILENAMETGZ2="$PROJECT-$MAJOR.$MINOR.$REL1";
|
||||
$FILENAMERPM=$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm";
|
||||
# For Deb
|
||||
$newbuild = $BUILD;
|
||||
$newbuild =~ s/(dev|alpha)/1/gi; # dev
|
||||
$newbuild =~ s/beta/2/gi; # beta
|
||||
$newbuild =~ s/rc./3/gi; # rc
|
||||
if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale is same than rc.
|
||||
# now newbuild is 0-1 or 0-3 for example. Note that for native package (see debian/source/format), we should not use a dash part but to get a better version management
|
||||
$build = $newbuild;
|
||||
$build =~ s/-.*$//g;
|
||||
# now build is 0 for example
|
||||
# $build .= '+nmu1';
|
||||
# now build is 0+nmu1 for example
|
||||
$FILENAMEDEBNATIVE="${PROJECT}_${MAJOR}.${MINOR}.${build}";
|
||||
$FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${newbuild}";
|
||||
|
||||
|
||||
my $copyalreadydone=0;
|
||||
my $batch=0;
|
||||
for (0..@ARGV-1) {
|
||||
if ($ARGV[$_] =~ /^-*target=(\w+)/i) { $target=$1; $batch=1; }
|
||||
@@ -103,41 +172,47 @@ for (0..@ARGV-1) {
|
||||
$FILENAMESNAPSHOT.="-".$PREFIX;
|
||||
}
|
||||
}
|
||||
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
|
||||
|
||||
if ($ENV{"DESTIBETARC"} && $BUILD =~ /[a-z]/i) { $DESTI = $ENV{"DESTIBETARC"}; } # Force output dir if env DESTIBETARC is defined
|
||||
if ($ENV{"DESTISTABLE"} && $BUILD =~ /^[0-9]+$/) { $DESTI = $ENV{"DESTISTABLE"}; } # Force output dir if env DESTISTABLE is defined
|
||||
if ($ENV{"PUBLISHBETARC"} && $BUILD =~ /[a-z]/i) { $PUBLISH = $ENV{"PUBLISHBETARC"}; } # Force target site for publishing if env PUBLISHBETARC is defined
|
||||
if ($ENV{"PUBLISHSTABLE"} && $BUILD =~ /^[0-9]+$/) { $PUBLISH = $ENV{"PUBLISHSTABLE"}; } # Force target site for publishing if env PUBLISHSTABLE is defined
|
||||
|
||||
print "Makepack version $VERSION\n";
|
||||
print "Building package name: $PROJECT\n";
|
||||
print "Building package version: $MAJOR.$MINOR.$BUILD\n";
|
||||
print "Building/publishing package name: $PROJECT\n";
|
||||
print "Building/publishing package version: $MAJOR.$MINOR.$BUILD\n";
|
||||
print "Source directory (SOURCE): $SOURCE\n";
|
||||
print "Target directory (DESTI) : $DESTI\n";
|
||||
print "Publishing target (PUBLISH): $PUBLISH\n";
|
||||
|
||||
|
||||
# Choose package targets
|
||||
#-----------------------
|
||||
if ($target) {
|
||||
$CHOOSEDTARGET{uc($target)}=1;
|
||||
if ($target eq "ALL") {
|
||||
foreach my $key (@LISTETARGET) {
|
||||
if ($key ne 'SNAPSHOT' && $key ne 'SF') { $CHOOSEDTARGET{$key}=1; }
|
||||
}
|
||||
}
|
||||
if ($target ne "ALL" && $target ne "SF") { $CHOOSEDTARGET{uc($target)}=1; }
|
||||
if ($target eq "SF") { $CHOOSEDPUBLISH{"SF"}=1; }
|
||||
}
|
||||
else {
|
||||
my $found=0;
|
||||
my $NUM_SCRIPT;
|
||||
my $cpt=0;
|
||||
while (! $found) {
|
||||
my $cpt=0;
|
||||
printf(" %2d - %-12s (%s)\n",$cpt,"All (Except SNAPSHOT)","Need ".join(",",values %REQUIREMENTTARGET));
|
||||
printf(" %2d - %-12s (%s)\n",$cpt,"ALL (1..9)","Need ".join(",",values %REQUIREMENTTARGET));
|
||||
foreach my $target (@LISTETARGET) {
|
||||
$cpt++;
|
||||
printf(" %2d - %-12s (%s)\n",$cpt,$target,"Need ".$REQUIREMENTTARGET{$target});
|
||||
}
|
||||
$cpt=99;
|
||||
printf(" %2d - %-12s (%s)\n",$cpt,"SF (publish)","Need ".join(",",values %REQUIREMENTPUBLISH));
|
||||
|
||||
# On demande de choisir le fichier à passer
|
||||
# Ask which target to build
|
||||
print "Choose one package number or several separated with space (0 - ".$cpt."): ";
|
||||
$NUM_SCRIPT=<STDIN>;
|
||||
chomp($NUM_SCRIPT);
|
||||
if ($NUM_SCRIPT =~ s/-//g) {
|
||||
# Do not do copy
|
||||
$copyalreadydone=1;
|
||||
}
|
||||
if ($NUM_SCRIPT !~ /^[0-9\s]+$/)
|
||||
{
|
||||
print "This is not a valid package number list.\n";
|
||||
@@ -149,15 +224,20 @@ else {
|
||||
}
|
||||
}
|
||||
print "\n";
|
||||
if ($NUM_SCRIPT) {
|
||||
foreach my $num (split(/\s+/,$NUM_SCRIPT)) {
|
||||
$CHOOSEDTARGET{$LISTETARGET[$num-1]}=1;
|
||||
}
|
||||
if ($NUM_SCRIPT eq "99") {
|
||||
$CHOOSEDPUBLISH{"SF"}=1;
|
||||
}
|
||||
else {
|
||||
foreach my $key (@LISTETARGET) {
|
||||
if ($key ne 'SNAPSHOT') { $CHOOSEDTARGET{$key}=1; }
|
||||
}
|
||||
if ($NUM_SCRIPT eq "0") {
|
||||
foreach my $key (@LISTETARGET) {
|
||||
if ($key ne 'SNAPSHOT' && $key ne 'SF') { $CHOOSEDTARGET{$key}=1; }
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach my $num (split(/\s+/,$NUM_SCRIPT)) {
|
||||
$CHOOSEDTARGET{$LISTETARGET[$num-1]}=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,11 +254,13 @@ foreach my $target (keys %CHOOSEDTARGET) {
|
||||
}
|
||||
$atleastonerpm=1;
|
||||
}
|
||||
foreach my $req (split(/[,\s]/,$REQUIREMENTTARGET{$target})) {
|
||||
foreach my $req (split(/[,\s]/,$REQUIREMENTTARGET{$target}))
|
||||
{
|
||||
# Test
|
||||
print "Test requirement for target $target: Search '$req'... ";
|
||||
$newreq=$req; $newparam='';
|
||||
if ($newreq eq 'zip') { $newparam.='-h'; }
|
||||
if ($newreq eq 'xz') { $newparam.='-h'; }
|
||||
$cmd="\"$newreq\" $newparam 2>&1";
|
||||
print "Test command ".$cmd."... ";
|
||||
$ret=`$cmd`;
|
||||
@@ -197,7 +279,7 @@ foreach my $target (keys %CHOOSEDTARGET) {
|
||||
last;
|
||||
} else {
|
||||
# Pas erreur ou erreur autre que programme absent
|
||||
print " Found ".$REQUIREMENTTARGET{$target}."\n";
|
||||
print " Found ".$req."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -208,16 +290,20 @@ print "\n";
|
||||
#----------------------------------------------
|
||||
$nboftargetok=0;
|
||||
$nboftargetneedbuildroot=0;
|
||||
$nboftargetneedcvs=0;
|
||||
$nbofpublishneedtag=0;
|
||||
foreach my $target (keys %CHOOSEDTARGET) {
|
||||
if ($CHOOSEDTARGET{$target} < 0) { next; }
|
||||
if ($target ne 'EXE' && $target ne 'EXEDOLIWAMP')
|
||||
{
|
||||
$nboftargetneedbuildroot++;
|
||||
}
|
||||
if ($target eq 'SNAPSHOT')
|
||||
$nboftargetok++;
|
||||
}
|
||||
foreach my $target (keys %CHOOSEDPUBLISH) {
|
||||
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
|
||||
if ($target eq 'SF')
|
||||
{
|
||||
$nboftargetneedcvs++;
|
||||
$nbofpublishneedtag++;
|
||||
}
|
||||
$nboftargetok++;
|
||||
}
|
||||
@@ -226,13 +312,26 @@ if ($nboftargetok) {
|
||||
|
||||
# Update CVS if required
|
||||
#-----------------------
|
||||
if ($nboftargetneedcvs)
|
||||
if ($nbofpublishneedtag)
|
||||
{
|
||||
print "Go to directory $SOURCE\n";
|
||||
$olddir=getcwd();
|
||||
chdir("$SOURCE");
|
||||
print "Run cvs update -P -d\n";
|
||||
$ret=`cvs update -P -d 2>&1`;
|
||||
print 'Run git tag -a -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
|
||||
$ret=`git tag -a -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD" 2>&1`;
|
||||
if ($ret =~ /already exists/)
|
||||
{
|
||||
print "WARNING: Tag ".$MAJOR.'.'.$MINOR.'.'.$BUILD." already exists. Overwrite (y/N) ? ";
|
||||
$QUESTIONOVERWRITETAG=<STDIN>;
|
||||
chomp($QUESTIONOVERWRITETAG);
|
||||
if ($QUESTIONOVERWRITETAG =~ /(o|y)/)
|
||||
{
|
||||
print 'Run git tag -a -f -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
|
||||
$ret=`git tag -a -f -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD"`;
|
||||
}
|
||||
}
|
||||
print 'Run git push --tags'."\n";
|
||||
$ret=`git push --tags`;
|
||||
chdir("$olddir");
|
||||
}
|
||||
|
||||
@@ -250,15 +349,20 @@ if ($nboftargetok) {
|
||||
mkdir "$BUILDROOT/$PROJECT";
|
||||
print "Copy $SOURCE into $BUILDROOT/$PROJECT\n";
|
||||
$ret=`cp -pr "$SOURCE" "$BUILDROOT/$PROJECT"`;
|
||||
#print "Copy $SOURCE/build/debian/apache/.htaccess into $BUILDROOT/$PROJECT/build/debian/apache/.htaccess\n";
|
||||
#$ret=`cp -pr "$SOURCE/build/debian/apache/.htaccess" "$BUILDROOT/$PROJECT/build/debian/apache/.htaccess"`;
|
||||
}
|
||||
print "Clean $BUILDROOT\n";
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.buildpath`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.cache`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.externalToolBuilders`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.git`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.gitmodules`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.project`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.settings`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.travis.yml`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.tx`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build.xml`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/quickbuild.xml`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/pom.xml`;
|
||||
@@ -274,6 +378,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tar`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tar.gz`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tgz`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.xz`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.zip`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/doxygen/doxygen_warnings.log`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/cache.manifest`;
|
||||
@@ -287,6 +392,8 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/mysql/README`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/pgsql/README`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/install/mssql`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codesniffer`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codetemplates`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/dbmodel`;
|
||||
@@ -323,7 +430,9 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/bootstrap*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
|
||||
@@ -332,8 +441,12 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/jqueryFileTree/connectors/jqueryFileTree.pl`; # Avoid errors into rpmlint
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/template`; # Package not valid for most linux distributions (errors reported into compile.js). Package should be embed by modules to avoid problems.
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpmailer`; # Package not valid for most linux distributions (errors reported into file LICENSE). Package should be embed by modules to avoid problems.
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # Keep this removal in case we embed libraries
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/adapters`; # Keep this removal in case we embed libraries
|
||||
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`;
|
||||
$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/PCLZip`;
|
||||
@@ -343,7 +456,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/savant`;
|
||||
}
|
||||
|
||||
|
||||
# Build package for each target
|
||||
#------------------------------
|
||||
foreach my $target (keys %CHOOSEDTARGET)
|
||||
@@ -366,8 +479,7 @@ if ($nboftargetok) {
|
||||
$ret=`$cmd`;
|
||||
|
||||
print "Compress $BUILDROOT into $FILENAMESNAPSHOT.tgz...\n";
|
||||
#$cmd="tar --exclude \"$BUILDROOT/tgz/tar_exclude.txt\" --exclude .cache --exclude .settings --exclude conf.php --directory \"$BUILDROOT\" -czvf \"$FILENAMESNAPSHOT.tgz\" $FILENAMESNAPSHOT";
|
||||
$cmd="tar --exclude doli*.tgz --exclude doli*.deb --exclude doli*.exe --exclude doli*.zip --exclude doli*.rpm --exclude .cache --exclude .settings --exclude conf.php --exclude conf.php.mysql --exclude conf.php.old --exclude conf.php.postgres --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$FILENAMESNAPSHOT.tgz\" $FILENAMESNAPSHOT";
|
||||
$cmd="tar --exclude doli*.tgz --exclude doli*.deb --exclude doli*.exe --exclude doli*.xz --exclude doli*.zip --exclude doli*.rpm --exclude .cache --exclude .settings --exclude conf.php --exclude conf.php.mysql --exclude conf.php.old --exclude conf.php.postgres --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$FILENAMESNAPSHOT.tgz\" $FILENAMESNAPSHOT";
|
||||
print $cmd."\n";
|
||||
$ret=`$cmd`;
|
||||
|
||||
@@ -380,6 +492,7 @@ if ($nboftargetok) {
|
||||
if ($target eq 'TGZ')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
mkdir($DESTI.'/standard');
|
||||
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
|
||||
|
||||
print "Remove target $FILENAMETGZ.tgz...\n";
|
||||
@@ -403,9 +516,41 @@ if ($nboftargetok) {
|
||||
next;
|
||||
}
|
||||
|
||||
if ($target eq 'XZ')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
mkdir($DESTI.'/standard');
|
||||
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
|
||||
|
||||
print "Remove target $FILENAMEXZ.xz...\n";
|
||||
unlink("$NEWDESTI/$FILENAMEXZ.xz");
|
||||
|
||||
#rmdir "$BUILDROOT/$FILENAMEXZ";
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMEXZ`;
|
||||
print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$FILENAMEXZ\n";
|
||||
$cmd="cp -pr \"$BUILDROOT/$PROJECT\" \"$BUILDROOT/$FILENAMEXZ\"";
|
||||
$ret=`$cmd`;
|
||||
|
||||
print "Compress $FILENAMEXZ into $FILENAMEXZ.xz...\n";
|
||||
|
||||
print "Go to directory $BUILDROOT\n";
|
||||
$olddir=getcwd();
|
||||
chdir("$BUILDROOT");
|
||||
$cmd= "xz -9 -r $BUILDROOT/$FILENAMEAPS.xz \*";
|
||||
print $cmd."\n";
|
||||
$ret= `$cmd`;
|
||||
chdir("$olddir");
|
||||
|
||||
# Move to final dir
|
||||
print "Move $FILENAMEXZ.xz to $NEWDESTI/$FILENAMEXZ.xz\n";
|
||||
$ret=`mv "$BUILDROOT/$FILENAMEXZ.xz" "$NEWDESTI/$FILENAMEXZ.xz"`;
|
||||
next;
|
||||
}
|
||||
|
||||
if ($target eq 'ZIP')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
mkdir($DESTI.'/standard');
|
||||
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
|
||||
|
||||
print "Remove target $FILENAMEZIP.zip...\n";
|
||||
@@ -440,31 +585,18 @@ if ($nboftargetok) {
|
||||
if ($target =~ /FEDO/i) { $subdir="package_rpm_redhat-fedora"; }
|
||||
if ($target =~ /MAND/i) { $subdir="package_rpm_mandriva"; }
|
||||
if ($target =~ /OPEN/i) { $subdir="package_rpm_opensuse"; }
|
||||
mkdir($DESTI.'/'.$subdir);
|
||||
if (-d $DESTI.'/'.$subdir) { $NEWDESTI=$DESTI.'/'.$subdir; }
|
||||
|
||||
$ARCH='noarch';
|
||||
if ($RPMDIR eq "") { $RPMDIR=$ENV{'HOME'}."/rpmbuild"; }
|
||||
$newbuild = $BUILD;
|
||||
# For fedora
|
||||
$newbuild =~ s/(dev|alpha)/0.1.a/gi; # dev
|
||||
$newbuild =~ s/beta/0.2.beta1/gi; # beta
|
||||
$newbuild =~ s/rc./0.3.rc1/gi; # rc
|
||||
if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
|
||||
#$newbuild =~ s/(dev|alpha)/0/gi; # dev
|
||||
#$newbuild =~ s/beta/1/gi; # beta
|
||||
#$newbuild =~ s/rc./2/gi; # rc
|
||||
#if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
|
||||
$REL1 = $newbuild; $REL1 =~ s/-.*$//gi;
|
||||
if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; }
|
||||
print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n";
|
||||
|
||||
$FILENAMETGZ2="$PROJECT-$MAJOR.$MINOR.$REL1";
|
||||
print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n";
|
||||
|
||||
#print "Create directory $RPMDIR\n";
|
||||
#$ret=`mkdir -p "$RPMDIR"`;
|
||||
|
||||
print "Remove target ".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm...\n";
|
||||
unlink("$NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm");
|
||||
print "Remove target ".$FILENAMERPM."...\n";
|
||||
unlink("$NEWDESTI/".$FILENAMERPM);
|
||||
print "Remove target ".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm...\n";
|
||||
unlink("$NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm");
|
||||
|
||||
@@ -475,8 +607,8 @@ if ($nboftargetok) {
|
||||
$ret=`$cmd`;
|
||||
|
||||
# Set owners
|
||||
print "Set owners on files/dir\n";
|
||||
$ret=`chown -R root.root $BUILDROOT/$FILENAMETGZ2`;
|
||||
#print "Set owners on files/dir\n";
|
||||
#$ret=`chown -R root.root $BUILDROOT/$FILENAMETGZ2`;
|
||||
|
||||
print "Set permissions on files/dir\n";
|
||||
$ret=`chmod -R 755 $BUILDROOT/$FILENAMETGZ2`;
|
||||
@@ -519,11 +651,9 @@ if ($nboftargetok) {
|
||||
|
||||
# Move to final dir
|
||||
print "Move $RPMDIR/RPMS/".$ARCH."/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.".$ARCH.".rpm into $NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.".$ARCH.".rpm\n";
|
||||
#$cmd="mv \"$RPMDIR/RPMS/".$ARCH."/".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm\" \"$NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm\"";
|
||||
$cmd="mv $RPMDIR/RPMS/".$ARCH."/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.".$ARCH.".rpm \"$NEWDESTI/\"";
|
||||
$ret=`$cmd`;
|
||||
print "Move $RPMDIR/SRPMS/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.src.rpm into $NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.src.rpm\n";
|
||||
#$cmd="mv \"$RPMDIR/SRPMS/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm\" \"$NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm\"";
|
||||
$cmd="mv $RPMDIR/SRPMS/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.src.rpm \"$NEWDESTI/\"";
|
||||
$ret=`$cmd`;
|
||||
print "Move $RPMDIR/SOURCES/".$FILENAMETGZ2.".tgz into $NEWDESTI/".$FILENAMETGZ2.".tgz\n";
|
||||
@@ -535,23 +665,11 @@ if ($nboftargetok) {
|
||||
if ($target eq 'DEB')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
mkdir($DESTI.'/package_debian-ubuntu');
|
||||
if (-d $DESTI.'/package_debian-ubuntu') { $NEWDESTI=$DESTI.'/package_debian-ubuntu'; }
|
||||
|
||||
$olddir=getcwd();
|
||||
|
||||
$newbuild = $BUILD;
|
||||
$newbuild =~ s/(dev|alpha)/1/gi; # dev
|
||||
$newbuild =~ s/beta/2/gi; # beta
|
||||
$newbuild =~ s/rc./3/gi; # rc
|
||||
if ($newbuild !~ /-/) { $newbuild.='-4'; } # finale
|
||||
# now newbuild is 0-1 or 0-4 for example
|
||||
print "Version is $MAJOR.$MINOR.$newbuild\n";
|
||||
$build = $newbuild;
|
||||
$build =~ s/-.*$//g;
|
||||
# now build is 0 for example
|
||||
$build .= '+nmu1';
|
||||
# now build is 0+nmu1 for example
|
||||
|
||||
print "Remove target ${FILENAMEDEB}_all.deb...\n";
|
||||
unlink("$NEWDESTI/${FILENAMEDEB}_all.deb");
|
||||
print "Remove target ${FILENAMEDEB}.dsc...\n";
|
||||
@@ -560,6 +678,8 @@ if ($nboftargetok) {
|
||||
unlink("$NEWDESTI/${FILENAMEDEB}.tar.gz");
|
||||
print "Remove target ${FILENAMEDEB}.changes...\n";
|
||||
unlink("$NEWDESTI/${FILENAMEDEB}.changes");
|
||||
print "Remove target ${FILENAMEDEBNATIVE}.orig.tar.gz...\n";
|
||||
unlink("$NEWDESTI/${FILENAMEDEBNATIVE}.orig.tar.gz");
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build`;
|
||||
@@ -567,6 +687,8 @@ if ($nboftargetok) {
|
||||
print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$PROJECT.tmp\n";
|
||||
$cmd="cp -pr \"$BUILDROOT/$PROJECT\" \"$BUILDROOT/$PROJECT.tmp\"";
|
||||
$ret=`$cmd`;
|
||||
#$cmd="cp -pr \"$BUILDROOT/$PROJECT/build/debian/apache/.htaccess\" \"$BUILDROOT/$PROJECT.tmp/build/debian/apache/.htaccess\"";
|
||||
#$ret=`$cmd`;
|
||||
|
||||
print "Remove other files\n";
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/README-FR`;
|
||||
@@ -594,7 +716,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.templates.futur`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/rules`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/README.howto`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/wash`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/watch`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/doap`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/exe`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/launchpad`;
|
||||
@@ -603,13 +725,9 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/perl`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/rpm`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/zip`;
|
||||
# We remove embedded libraries or fonts (this is also inside rules file, target clean)
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/fonts`,
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/geoip`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/nusoap`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/odtphp/zip/pclzip`;
|
||||
|
||||
# Rename upstream changelog to match debian rules
|
||||
$ret=`mv $BUILDROOT/$PROJECT.tmp/ChangeLog $BUILDROOT/$PROJECT.tmp/changelog`;
|
||||
|
||||
# Prepare source package (init debian dir)
|
||||
print "Create directory $BUILDROOT/$PROJECT.tmp/debian\n";
|
||||
$ret=`mkdir "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
@@ -626,18 +744,24 @@ if ($nboftargetok) {
|
||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.xpm" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/README.source" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/rules" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/watch" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -fr "$SOURCE/build/debian/patches" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -fr "$SOURCE/build/debian/po" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -fr "$SOURCE/build/debian/source" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
#$ret=`cp -fr "$SOURCE/build/debian/apache" "$BUILDROOT/$PROJECT.tmp/debian/apache"`;
|
||||
#$ret=`cp -f "$SOURCE/build/debian/apache/.htaccess" "$BUILDROOT/$PROJECT.tmp/debian/apache"`;
|
||||
#$ret=`cp -fr "$SOURCE/build/debian/lighttpd" "$BUILDROOT/$PROJECT.tmp/debian/lighttpd"`;
|
||||
# Add files also required to build binary package
|
||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.config" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.postinst" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.postrm" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.templates" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/install.forced.php.install" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
|
||||
# Set owners and permissions
|
||||
print "Set owners on files/dir\n";
|
||||
$ret=`chown -R root.root $BUILDROOT/$PROJECT.tmp`;
|
||||
#print "Set owners on files/dir\n";
|
||||
#$ret=`chown -R root.root $BUILDROOT/$PROJECT.tmp`;
|
||||
|
||||
print "Set permissions on files/dir\n";
|
||||
$ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp`;
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp -type f -exec chmod 644 {} \\; ";
|
||||
@@ -666,6 +790,16 @@ if ($nboftargetok) {
|
||||
$cmd="mv $BUILDROOT/$PROJECT.tmp $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build";
|
||||
$ret=`$cmd`;
|
||||
|
||||
|
||||
print "Go into directory $BUILDROOT\n";
|
||||
chdir("$BUILDROOT");
|
||||
|
||||
# We need a tarball to be able to build "quilt" debian package (not required for native but we need patch so it is not a native)
|
||||
print "Compress $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build into $BUILDROOT/$FILENAMEDEBNATIVE.orig.tar.gz...\n";
|
||||
$cmd="tar --exclude-vcs --exclude-from \"$BUILDROOT/$PROJECT/build/tgz/tar_exclude.txt\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$BUILDROOT/$FILENAMEDEBNATIVE.orig.tar.gz\" $PROJECT-$MAJOR.$MINOR.$build";
|
||||
print $cmd."\n";
|
||||
$ret=`$cmd`;
|
||||
|
||||
# Creation of source package
|
||||
print "Go into directory $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build\n";
|
||||
chdir("$BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build");
|
||||
@@ -677,11 +811,14 @@ if ($nboftargetok) {
|
||||
|
||||
chdir("$olddir");
|
||||
|
||||
print "You can check bin package with lintian --pedantic -E -I \"$NEWDESTI/${FILENAMEDEB}_all.deb\"\n";
|
||||
print "You can check src package with lintian --pedantic -E -I \"$NEWDESTI/${FILENAMEDEB}.dsc\"\n";
|
||||
|
||||
# Move to final dir
|
||||
print "Move *_all.deb to $NEWDESTI\n";
|
||||
print "Move *_all.deb *.dsc *.orig.tar.gz *.changes to $NEWDESTI\n";
|
||||
$ret=`mv $BUILDROOT/*_all.deb "$NEWDESTI/"`;
|
||||
$ret=`mv $BUILDROOT/*.dsc "$NEWDESTI/"`;
|
||||
$ret=`mv $BUILDROOT/*.tar.gz "$NEWDESTI/"`;
|
||||
$ret=`mv $BUILDROOT/*.orig.tar.gz "$NEWDESTI/"`;
|
||||
$ret=`mv $BUILDROOT/*.changes "$NEWDESTI/"`;
|
||||
next;
|
||||
}
|
||||
@@ -689,6 +826,7 @@ if ($nboftargetok) {
|
||||
if ($target eq 'APS')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
mkdir($DESTI.'/package_aps');
|
||||
if (-d $DESTI.'/package_aps') { $NEWDESTI=$DESTI.'/package_aps'; }
|
||||
|
||||
$newbuild = $BUILD;
|
||||
@@ -773,6 +911,7 @@ if ($nboftargetok) {
|
||||
if ($target eq 'EXEDOLIWAMP')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
mkdir($DESTI.'/package_windows');
|
||||
if (-d $DESTI.'/package_windows') { $NEWDESTI=$DESTI.'/package_windows'; }
|
||||
|
||||
print "Remove target $FILENAMEEXEDOLIWAMP.exe...\n";
|
||||
@@ -794,6 +933,81 @@ if ($nboftargetok) {
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
# Build package for each target
|
||||
#------------------------------
|
||||
foreach my $target (keys %CHOOSEDPUBLISH)
|
||||
{
|
||||
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
|
||||
|
||||
print "\nList of files to publish\n";
|
||||
%filestoscan=(
|
||||
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
|
||||
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)',
|
||||
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
|
||||
"$DESTI/standard/$FILENAMETGZ.zip"=>'Dolibarr ERP-CRM'
|
||||
);
|
||||
foreach my $file (sort keys %filestoscan)
|
||||
{
|
||||
$found=0;
|
||||
my $filesize = -s $file;
|
||||
print $file." ".($filesize?"(found)":"(not found)");
|
||||
print ($filesize?" - ".$filesize:"");
|
||||
print "\n";
|
||||
}
|
||||
|
||||
if ($target eq 'SF')
|
||||
{
|
||||
print "\n";
|
||||
|
||||
$NEWPUBLISH=$PUBLISH;
|
||||
print "Publish to target $NEWPUBLISH. Click enter or CTRL+C...\n";
|
||||
|
||||
# Ask which target to build
|
||||
$NUM_SCRIPT=<STDIN>;
|
||||
chomp($NUM_SCRIPT);
|
||||
|
||||
print "Create empty dir /tmp/emptydir. We need it to create target dir using rsync.\n";
|
||||
$ret=`mkdir -p "/tmp/emptydir/"`;
|
||||
|
||||
foreach my $file (sort keys %filestoscan)
|
||||
{
|
||||
$found=0;
|
||||
my $filesize = -s $file;
|
||||
if (! $filesize) { next; }
|
||||
|
||||
print "\n";
|
||||
print "Publish file ".$file." to ".$filestoscan{$file}."\n";
|
||||
|
||||
$destFolder="$NEWPUBLISH/$filestoscan{$file}/".$MAJOR.'.'.$MINOR.'.'.$BUILD;
|
||||
|
||||
# mkdir
|
||||
#my $ssh = Net::SSH::Perl->new("frs.sourceforge.net");
|
||||
#$ssh->login("$user","$pass");
|
||||
#use String::ShellQuote qw( shell_quote );
|
||||
#$ssh->cmd('mkdir '.shell_quote($destFolder).' && exit');
|
||||
|
||||
#use Net::SFTP::Foreign;
|
||||
#my $sftp = Net::SFTP::Foreign->new($ip, user => $user, password => $pass, autodie => 1);
|
||||
#$sftp->mkdir($destFolder)
|
||||
|
||||
#$command="ssh eldy,dolibarr\@frs.sourceforge.net mkdir -p \"$destFolder\"";
|
||||
#print "$command\n";
|
||||
#my $ret=`$command 2>&1`;
|
||||
$command="rsync -s -e 'ssh' --recursive /tmp/emptydir/ \"".$destFolder."\"";
|
||||
print "$command\n";
|
||||
my $ret=`$command 2>&1`;
|
||||
|
||||
$command="rsync -s $OPTIONUPDATEDIST -e 'ssh' \"$file\" \"".$destFolder."\"";
|
||||
print "$command\n";
|
||||
my $ret=`$command 2>&1`;
|
||||
print "$ret\n";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print "\n----- Summary -----\n";
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
</Company_Info>
|
||||
<Program_Info>
|
||||
<Program_Name>Dolibarr</Program_Name>
|
||||
<Program_Version>3.4</Program_Version>
|
||||
<Program_Release_Month>07</Program_Release_Month>
|
||||
<Program_Release_Day>07</Program_Release_Day>
|
||||
<Program_Release_Year>2013</Program_Release_Year>
|
||||
<Program_Version>3.3.5</Program_Version>
|
||||
<Program_Release_Month>01</Program_Release_Month>
|
||||
<Program_Release_Day>01</Program_Release_Day>
|
||||
<Program_Release_Year>2014</Program_Release_Year>
|
||||
<Program_Cost_Dollars />
|
||||
<Program_Cost_Other_Code />
|
||||
<Program_Cost_Other />
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
</Company_Info>
|
||||
<Program_Info>
|
||||
<Program_Name>DoliWamp</Program_Name>
|
||||
<Program_Version>3.4</Program_Version>
|
||||
<Program_Release_Month>07</Program_Release_Month>
|
||||
<Program_Release_Day>07</Program_Release_Day>
|
||||
<Program_Release_Year>2013</Program_Release_Year>
|
||||
<Program_Version>3.3.5</Program_Version>
|
||||
<Program_Release_Month>01</Program_Release_Month>
|
||||
<Program_Release_Day>01</Program_Release_Day>
|
||||
<Program_Release_Year>2014</Program_Release_Year>
|
||||
<Program_Cost_Dollars />
|
||||
<Program_Cost_Other_Code />
|
||||
<Program_Cost_Other />
|
||||
|
||||
@@ -30,7 +30,7 @@ return "Regis Houssin";
|
||||
# script_dolibarr_versions()
|
||||
sub script_dolibarr_versions
|
||||
{
|
||||
return ( "3.4.0", "3.3.3", "3.3.2", "3.3.1", "3.3.0", "3.2.1", "3.1.1" );
|
||||
return ( "3.3.3", "3.3.2", "3.3.1", "3.3.0", "3.2.1", "3.1.1" );
|
||||
}
|
||||
|
||||
sub script_dolibarr_category
|
||||
|
||||
@@ -26,9 +26,8 @@ with format RPM (for Redhat, OpenSuse, Mandriva, ...).
|
||||
# restorecon -R -v /file Restore values into files (cancel chcon, validate semanage)
|
||||
#
|
||||
# On OpenSuse
|
||||
# zypper install dolibarr-...rpm To install package and dependencies
|
||||
# zypper remove dolibarr To remove package
|
||||
# zypper search xxx To search a package
|
||||
# yast --install dolibarr-...rpm To install package and dependencies
|
||||
# yast --remove dolibarr To remove package
|
||||
#
|
||||
# On Mageia (after su - root)
|
||||
# urpmi dolibarr-...rpm To install package and dependencies
|
||||
|
||||
@@ -14,7 +14,7 @@ Summary(es): Software ERP y CRM para pequeñas y medianas empresas, asociaciones
|
||||
Summary(fr): Logiciel ERP & CRM de gestion de PME/PMI, auto-entrepreneurs ou associations
|
||||
Summary(it): Programmo gestionale per piccole imprese, fondazioni e liberi professionisti
|
||||
|
||||
License: GPLv3+
|
||||
License: GPL-3.0+
|
||||
#Packager: Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
|
||||
Vendor: Dolibarr dev team
|
||||
|
||||
@@ -186,10 +186,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printipp
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
@@ -279,11 +277,18 @@ echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
||||
|
||||
# Restart web server
|
||||
echo Restart web server
|
||||
/sbin/service httpd restart
|
||||
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||
%{_sysconfdir}/init.d/httpd restart
|
||||
fi
|
||||
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||
%{_sysconfdir}/init.d/apache2 restart
|
||||
fi
|
||||
|
||||
# Restart mysql server
|
||||
echo Restart mysql server
|
||||
/sbin/service mysqld restart
|
||||
# Restart mysql
|
||||
echo Restart mysql
|
||||
if [ -f /etc/init.d/mysqld ]; then
|
||||
/etc/init.d/mysqld restart
|
||||
fi
|
||||
|
||||
# Show result
|
||||
echo
|
||||
@@ -328,7 +333,7 @@ else
|
||||
echo "No remove ation done (this is an upgrade)"
|
||||
fi
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
|
||||
%changelog
|
||||
* Sun Feb 17 2013 Laurent Destailleur 3.4.0-0.3
|
||||
* Mon Apr 22 2013 Laurent Destailleur 3.3.5-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -18,11 +18,7 @@ Summary(es): Software ERP y CRM para pequeñas y medianas empresas, asociaciones
|
||||
Summary(fr): Logiciel ERP & CRM de gestion de PME/PMI, auto-entrepreneurs ou associations
|
||||
Summary(it): Programmo gestionale per piccole imprese, fondazioni e liberi professionisti
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
|
||||
License: GPLv3+
|
||||
%else
|
||||
License: GPL-3.0+
|
||||
%endif
|
||||
#Packager: Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
|
||||
Vendor: Dolibarr dev team
|
||||
|
||||
@@ -266,10 +262,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printipp
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
@@ -382,7 +376,7 @@ fi
|
||||
# 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
|
||||
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
|
||||
@@ -447,16 +441,12 @@ echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
||||
|
||||
# Restart web server
|
||||
echo Restart web server
|
||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion}
|
||||
/sbin/service httpd restart
|
||||
%else
|
||||
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||
%{_sysconfdir}/init.d/httpd restart
|
||||
fi
|
||||
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||
%{_sysconfdir}/init.d/apache2 restart
|
||||
fi
|
||||
%endif
|
||||
|
||||
# Restart mysql server
|
||||
echo Restart mysql server
|
||||
@@ -464,7 +454,11 @@ echo Restart mysql server
|
||||
/sbin/service mysqld restart
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
if [ -f /etc/init.d/mysqld ]; then
|
||||
/etc/init.d/mysqld restart
|
||||
else
|
||||
/sbin/service mysql restart
|
||||
fi
|
||||
%else
|
||||
if [ -f /etc/init.d/mysqld ]; then
|
||||
/etc/init.d/mysqld restart
|
||||
@@ -552,7 +546,7 @@ else
|
||||
echo "No remove ation done (this is an upgrade)"
|
||||
fi
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
|
||||
%changelog
|
||||
* Sun Feb 17 2013 Laurent Destailleur 3.4.0-0.3
|
||||
* Mon Apr 22 2013 Laurent Destailleur 3.3.5-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -183,10 +183,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printipp
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
@@ -333,7 +331,7 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
|
||||
%changelog
|
||||
* Sun Feb 17 2013 Laurent Destailleur 3.4.0-0.3
|
||||
* Mon Apr 22 2013 Laurent Destailleur 3.3.5-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -194,10 +194,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printipp
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
@@ -288,7 +286,11 @@ fi
|
||||
|
||||
# Restart mysql
|
||||
echo Restart mysql
|
||||
/sbin/service mysql restart
|
||||
if [ -f /etc/init.d/mysqld ]; then
|
||||
/etc/init.d/mysqld restart
|
||||
else
|
||||
/sbin/service mysql restart
|
||||
fi
|
||||
|
||||
# Show result
|
||||
echo
|
||||
@@ -339,7 +341,6 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
%changelog
|
||||
* Sun Feb 17 2013 Laurent Destailleur 3.4.0-0.3
|
||||
* Mon Apr 22 2013 Laurent Destailleur 3.3.5-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -18,6 +18,4 @@ $force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one
|
||||
// We don't force any external lib with generic package
|
||||
?>
|
||||
@@ -19,10 +19,10 @@ $force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
|
||||
// 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_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_PHPEXCEL_PATH='';
|
||||
$force_dolibarr_lib_TCPDF_PATH='';
|
||||
|
||||
@@ -37,44 +37,26 @@ htdocs/customleave
|
||||
htdocs/customgoogle
|
||||
htdocs/document
|
||||
htdocs/documents
|
||||
htdocs/includes/jpgraph2
|
||||
htdocs/includes/fckeditor/_samples
|
||||
htdocs/includes/fckeditor/_testcases
|
||||
htdocs/includes/nusoap/samples
|
||||
htdocs/includes/phplot5
|
||||
htdocs/includes/scriptaculous/test
|
||||
htdocs/includes/treemenu/docs
|
||||
htdocs/includes/treemenu/images
|
||||
htdocs/includes/treemenu/imagesAlt
|
||||
htdocs/includes/treemenu/imagesAlt2
|
||||
htdocs/includes/tcpdf/fonts/utils
|
||||
htdocs/includes/tcpdf/fonts/free*.ctg.z
|
||||
htdocs/includes/tcpdf/fonts/free*.z
|
||||
htdocs/lolix
|
||||
htdocs/oscommerce_ws/ws_client_demo
|
||||
htdocs/postnuke
|
||||
htdocs/public/bplc
|
||||
htdocs/rapport
|
||||
htdocs/theme/rodolphe
|
||||
htdocs/telephonie
|
||||
htdocs/voyage
|
||||
mssql
|
||||
scripts/addons
|
||||
scripts/books
|
||||
scripts/courrier
|
||||
scripts/lolix
|
||||
scripts/product/import-product.php
|
||||
scripts/product/materiel.net.php
|
||||
test
|
||||
CVS
|
||||
*~
|
||||
.#*
|
||||
.buildpath
|
||||
.cache
|
||||
.cvsignore
|
||||
.gitignore
|
||||
.externalToolBuilders
|
||||
.htaccess
|
||||
.settings
|
||||
.project
|
||||
.travis.yml
|
||||
Thumbs.db
|
||||
data_dev.sql
|
||||
doli*.tar.gz
|
||||
@@ -84,18 +66,5 @@ doli*.rpm
|
||||
doli*.deb
|
||||
doli*.zip
|
||||
cvschangelogbuilder_dolibarr*
|
||||
deneb
|
||||
janus
|
||||
jupiter
|
||||
lune
|
||||
mars
|
||||
pluton
|
||||
saturne
|
||||
venus
|
||||
bigorneau
|
||||
tourteau
|
||||
bulot
|
||||
huitre
|
||||
pdf_huitre.modules.php
|
||||
doxygen_warnings.log
|
||||
dolibarr_install.log
|
||||
@@ -31,11 +31,8 @@
|
||||
*/htdocs/custom2/*
|
||||
*/htdocs/document/*
|
||||
*/htdocs/documents/*
|
||||
*/htdocs/lolix/*
|
||||
*/htdocs/postnuke/*
|
||||
*/htdocs/telephonie/*
|
||||
*/htdocs/voyage/*
|
||||
*/htdocs/includes/jpgraph2/*
|
||||
*/htdocs/includes/ckeditor/_source
|
||||
*/htdocs/includes/ckeditor/*_source.js
|
||||
*/htdocs/includes/fckeditor/_samples/*
|
||||
*/htdocs/includes/fckeditor/_testcases/*
|
||||
*/htdocs/includes/nusoap/samples/*
|
||||
@@ -49,20 +46,18 @@
|
||||
*/htdocs/includes/tcpdf/fonts/utils/*
|
||||
*/htdocs/includes/tcpdf/fonts/free*.ctg.z
|
||||
*/htdocs/includes/tcpdf/fonts/free*.z
|
||||
*/htdocs/oscommerce_ws/ws_client_demo/*
|
||||
*/htdocs/theme/rodolphe/*
|
||||
*/scripts/addons/*
|
||||
*/scripts/courrier/*
|
||||
*/scripts/lolix/*
|
||||
*/test
|
||||
*/CVS/*
|
||||
*~
|
||||
*.#*
|
||||
*.buildpath*
|
||||
*.cache*
|
||||
*.cvsignore*
|
||||
*.gitignore*
|
||||
*.htaccess*
|
||||
*.settings*
|
||||
*.project*
|
||||
*.travis.yml*
|
||||
Thumbs.db
|
||||
data_dev.sql
|
||||
dolibarr*.tar.gz
|
||||
@@ -72,19 +67,5 @@ dolibarr*.rpm
|
||||
dolibarr*.deb
|
||||
dolibarr*.zip
|
||||
cvschangelogbuilder_dolibarr*
|
||||
*/deneb/*
|
||||
*/janus/*
|
||||
*/jupiter/*
|
||||
*/lune/*
|
||||
*/mars/*
|
||||
*/mercure/*
|
||||
*/pluton/*
|
||||
*/saturne/*
|
||||
*/venus/*
|
||||
*/bigorneau/*
|
||||
*/tourteau/*
|
||||
*/bulot/*
|
||||
*/huitre/*
|
||||
*/pdf_huitre.modules.php
|
||||
doxygen_warnings.log
|
||||
dolibarr_install.log
|
||||
@@ -2,7 +2,7 @@ README (English)
|
||||
--------------------------------
|
||||
This directory contains sub-directories to provide tools or
|
||||
documentation for developers.
|
||||
Note: All files in this directory are in VCS only and are not
|
||||
Note: All files in this directory are in CVS only and are not
|
||||
provided with a standard release.
|
||||
|
||||
|
||||
|
||||
@@ -219,6 +219,10 @@
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionNameInvalid">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionNoCapital">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<!-- some phpcs have a typo error in rule, so we add it too -->
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionNoCaptial">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
@@ -48,3 +48,8 @@ with
|
||||
//var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
|
||||
window.location.href=pRef
|
||||
* Replace hard coded string with i18n["String"];
|
||||
|
||||
|
||||
JCROP:
|
||||
------
|
||||
* Remove analytics tag into file index.html
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Checks if files contains UTF-8 BOM
|
||||
# in dolibarr includes tree excluding
|
||||
# git repository
|
||||
#
|
||||
# Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr
|
||||
grep -rlI \
|
||||
--exclude-dir='.git' \
|
||||
$'\xEF\xBB\xBF' htdocs/includes
|
||||
@@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------
|
||||
# Script to find files that are not Unix encoded
|
||||
#
|
||||
# Laurent Destailleur - eldy@users.sourceforge.net
|
||||
#------------------------------------------------------
|
||||
# Usage: fixdosfiles.sh [list|fix]
|
||||
#------------------------------------------------------
|
||||
|
||||
# Syntax
|
||||
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
||||
then
|
||||
echo "Usage: fixdosfiles.sh [list|fix]"
|
||||
fi
|
||||
|
||||
# To detec
|
||||
if [ "x$1" = "xlist" ]
|
||||
then
|
||||
find . \( -iname "*.php" -o -iname "*.sh" -o -iname "*.pl" -o -iname "*.lang" -o -iname "*.txt" \) -exec file "{}" + | grep -v 'htdocs\/includes' | grep CRLF
|
||||
fi
|
||||
|
||||
# To convert
|
||||
if [ "x$1" = "xfix" ]
|
||||
then
|
||||
for fic in `find . \( -iname "*.php" -o -iname "*.sh" -o -iname "*.pl" -o -iname "*.lang" -o -iname "*.txt" \) -exec file "{}" + | grep -v 'htdocs\/includes' | grep CRLF | awk -F':' '{ print $1 }' `
|
||||
do
|
||||
echo "Fix file $fic"
|
||||
dos2unix $fic
|
||||
done;
|
||||
fi
|
||||
@@ -1,39 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Checks of fix files contains UTF-8 BOM in dolibarr source tree,
|
||||
# excluding git repository, custom modules and included libraries.
|
||||
#
|
||||
# Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr
|
||||
# Laurent Destailleur eldy@users.sourceforge.net
|
||||
#------------------------------------------------------
|
||||
# Usage: fixutf8bomfiles.sh [list|fix]
|
||||
#------------------------------------------------------
|
||||
|
||||
# Syntax
|
||||
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
||||
then
|
||||
echo "Usage: fixutf8bomfiles.sh (list|fix) [addincludes]"
|
||||
fi
|
||||
|
||||
if [ "x$2" != "xaddincludes" ]
|
||||
then
|
||||
export moreoptions="--exclude-dir='includes'"
|
||||
fi
|
||||
|
||||
# To detec
|
||||
if [ "x$1" = "xlist" ]
|
||||
then
|
||||
#find . \( -iname '*.php' -print0 -o -iname '*.sh' -print0 -o -iname '*.pl' -print0 -o -iname '*.lang' -print0 -o -iname '*.txt' \) -print0 | xargs -0 awk '/^\xEF\xBB\xBF/ {print FILENAME} {nextfile}'
|
||||
echo "grep -rlIZ --include='*.php' --include='*.sh' --include='*.pl' --include='*.lang' --include='*.txt' --exclude-dir='.git' --exclude-dir='.tx' $moreoptions --exclude-dir='custom' . . | xargs -0 awk '/^\xEF\xBB\xBF/ {print FILENAME} {nextfile}'"
|
||||
grep -rlIZ --include='*.php' --include='*.sh' --include='*.pl' --include='*.lang' --include='*.txt' --exclude-dir='.git' --exclude-dir='.tx' $moreoptions --exclude-dir='custom' . . | xargs -0 awk '/^\xEF\xBB\xBF/ {print FILENAME} {nextfile}'
|
||||
fi
|
||||
|
||||
# To convert
|
||||
if [ "x$1" = "xfix" ]
|
||||
then
|
||||
for fic in `grep -rlIZ --include='*.php' --include='*.sh' --include='*.pl' --include='*.lang' --include='*.txt' --exclude-dir='.git' --exclude-dir='.tx' $moreoptions --exclude-dir='custom' . . | xargs -0 awk '/^\xEF\xBB\xBF/ {print FILENAME} {nextfile}'`
|
||||
do
|
||||
echo "Fixing $fic"
|
||||
sed -i '1s/^\xEF\xBB\xBF//' $fic
|
||||
done;
|
||||
fi
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
@@ -41,8 +41,8 @@ include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
|
||||
$listoftown = array("Auray","Baden","Vannes","Pirouville","Haguenau","Souffelweiersheim","Illkirch-Graffenstaden","Lauterbourg","Picauville","Sainte-Mère Eglise","Le Bono");
|
||||
$listoflastname = array("Joe","Marc","Steve","Laurent","Nico","Isabelle","Dorothee","Saby","Brigitte","Karine","Jose-Anne","Celine","Virginie");
|
||||
$villes = array("Auray","Baden","Vannes","Pirouville","Haguenau","Souffelweiersheim","Illkirch-Graffenstaden","Lauterbourg","Picauville","Sainte-Mère Eglise","Le Bono");
|
||||
$prenoms = array("Joe","Marc","Steve","Laurent","Nico","Isabelle","Dorothee","Saby","Brigitte","Karine","Jose-Anne","Celine","Virginie");
|
||||
|
||||
|
||||
/*
|
||||
@@ -90,7 +90,7 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
|
||||
print "Company $s\n";
|
||||
$soc = new Societe($db);
|
||||
$soc->nom = "Company num ".time()."$s";
|
||||
$soc->town = $listoftown[rand(0, count($listoftown)-1)];
|
||||
$soc->ville = $villes[rand(0, count($villes)-1)];
|
||||
$soc->client = rand(1,2); // Une societe sur 2 est prospect, l'autre client
|
||||
$soc->fournisseur = rand(0,1); // Une societe sur 2 est fournisseur
|
||||
$soc->code_client='CU'.time()."$s";
|
||||
@@ -112,8 +112,8 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
|
||||
{
|
||||
$contact = new Contact($db);
|
||||
$contact->socid = $soc->id;
|
||||
$contact->lastname = "Lastname".$c;
|
||||
$contact->firstname = $listoflastname[rand(0, count($listoflastname)-1)];
|
||||
$contact->name = "Lastname".$c;
|
||||
$contact->firstname = $prenoms[rand(0, count($prenoms)-1)];
|
||||
if ( $contact->create($user) )
|
||||
{
|
||||
|
||||
|
||||
@@ -5619,69 +5619,6 @@ INSERT INTO `llx_stock_mouvement` VALUES (1,'2010-07-08 22:43:51','2010-07-09 00
|
||||
/*!40000 ALTER TABLE `llx_stock_mouvement` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `llx_submitew_targets`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `llx_submitew_targets`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `llx_submitew_targets` (
|
||||
`rowid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`label` varchar(64) NOT NULL,
|
||||
`targetcode` varchar(16) NOT NULL,
|
||||
`langcode` varchar(5) DEFAULT 'en_US',
|
||||
`url` varchar(250) DEFAULT NULL,
|
||||
`login` varchar(128) DEFAULT NULL,
|
||||
`pass` varchar(128) DEFAULT NULL,
|
||||
`comment` varchar(250) DEFAULT NULL,
|
||||
`position` int(11) DEFAULT '0',
|
||||
`titlelength` int(11) DEFAULT '32',
|
||||
`descshortlength` int(11) DEFAULT '256',
|
||||
`desclonglength` int(11) DEFAULT '2000',
|
||||
PRIMARY KEY (`rowid`),
|
||||
UNIQUE KEY `uk_submitewtargets` (`label`,`langcode`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `llx_submitew_targets`
|
||||
--
|
||||
|
||||
LOCK TABLES `llx_submitew_targets` WRITE;
|
||||
/*!40000 ALTER TABLE `llx_submitew_targets` DISABLE KEYS */;
|
||||
INSERT INTO `llx_submitew_targets` VALUES (17,'hhho','email','fr_FR','',NULL,NULL,NULL,0,0,-1,0),(34,'pppp','facebook','fr_FR',NULL,'eldy','ld101010-fk',NULL,0,-1,-1,-1),(35,'hfghfgh','web','de_DE','http://wwww','ffffmmm','null',NULL,0,-1,-1,-1),(37,'llll','linkedin','fr_FR','',NULL,NULL,NULL,0,32,256,2000),(55,'fff','dig','fr_FR',NULL,'hfgh','hfghgf',NULL,0,-1,-1,-1),(56,'aaaaaaa','linkedin','da_DK',NULL,'aa','aaa',NULL,0,32,256,2000),(57,'ddd','dig','en_US',NULL,'dd',NULL,NULL,0,32,256,2000),(59,'dddff','dig','en_US',NULL,NULL,NULL,NULL,0,32,256,2000),(68,'dddffe','dig','en_US',NULL,NULL,NULL,NULL,0,32,256,2000),(70,'dddffef','dig','en_US','http://www.dig.com',NULL,NULL,NULL,0,32,256,2000),(71,'ffff','dig','en_US','http://www.dig.com',NULL,NULL,NULL,0,32,256,2000);
|
||||
/*!40000 ALTER TABLE `llx_submitew_targets` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `llx_submitew_targets_params`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `llx_submitew_targets_params`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `llx_submitew_targets_params` (
|
||||
`rowid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`fk_target` int(11) NOT NULL,
|
||||
`paramkey` varchar(16) NOT NULL,
|
||||
`paramvalue` varchar(128) DEFAULT '',
|
||||
PRIMARY KEY (`rowid`),
|
||||
UNIQUE KEY `idx_submitewtargets_fk_target` (`fk_target`),
|
||||
UNIQUE KEY `uk_submitewtargets_params` (`fk_target`,`paramkey`,`paramvalue`),
|
||||
CONSTRAINT `fk_submitewtargets_fk_target` FOREIGN KEY (`fk_target`) REFERENCES `llx_submitew_targets` (`rowid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `llx_submitew_targets_params`
|
||||
--
|
||||
|
||||
LOCK TABLES `llx_submitew_targets_params` WRITE;
|
||||
/*!40000 ALTER TABLE `llx_submitew_targets_params` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `llx_submitew_targets_params` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `llx_texts`
|
||||
--
|
||||
|
||||
@@ -5528,69 +5528,6 @@ INSERT INTO `llx_stock_mouvement` (`rowid`, `tms`, `datem`, `fk_product`, `fk_en
|
||||
/*!40000 ALTER TABLE `llx_stock_mouvement` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `llx_submitew_targets`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `llx_submitew_targets`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `llx_submitew_targets` (
|
||||
`rowid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`label` varchar(64) NOT NULL,
|
||||
`targetcode` varchar(16) NOT NULL,
|
||||
`langcode` varchar(5) DEFAULT 'en_US',
|
||||
`url` varchar(250) DEFAULT NULL,
|
||||
`login` varchar(128) DEFAULT NULL,
|
||||
`pass` varchar(128) DEFAULT NULL,
|
||||
`comment` varchar(250) DEFAULT NULL,
|
||||
`position` int(11) DEFAULT '0',
|
||||
`titlelength` int(11) DEFAULT '32',
|
||||
`descshortlength` int(11) DEFAULT '256',
|
||||
`desclonglength` int(11) DEFAULT '2000',
|
||||
PRIMARY KEY (`rowid`),
|
||||
UNIQUE KEY `uk_submitewtargets` (`label`,`langcode`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `llx_submitew_targets`
|
||||
--
|
||||
|
||||
LOCK TABLES `llx_submitew_targets` WRITE;
|
||||
/*!40000 ALTER TABLE `llx_submitew_targets` DISABLE KEYS */;
|
||||
INSERT INTO `llx_submitew_targets` (`rowid`, `label`, `targetcode`, `langcode`, `url`, `login`, `pass`, `comment`, `position`, `titlelength`, `descshortlength`, `desclonglength`) VALUES (17,'hhho','email','fr_FR','',NULL,NULL,NULL,0,0,-1,0),(34,'pppp','facebook','fr_FR',NULL,'eldy','ld101010-fk',NULL,0,-1,-1,-1),(35,'hfghfgh','web','de_DE','http://wwww','ffffmmm','null',NULL,0,-1,-1,-1),(37,'llll','linkedin','fr_FR','',NULL,NULL,NULL,0,32,256,2000),(55,'fff','dig','fr_FR',NULL,'hfgh','hfghgf',NULL,0,-1,-1,-1),(56,'aaaaaaa','linkedin','da_DK',NULL,'aa','aaa',NULL,0,32,256,2000),(57,'ddd','dig','en_US',NULL,'dd',NULL,NULL,0,32,256,2000),(59,'dddff','dig','en_US',NULL,NULL,NULL,NULL,0,32,256,2000),(68,'dddffe','dig','en_US',NULL,NULL,NULL,NULL,0,32,256,2000),(70,'dddffef','dig','en_US','http://www.dig.com',NULL,NULL,NULL,0,32,256,2000),(71,'ffff','dig','en_US','http://www.dig.com',NULL,NULL,NULL,0,32,256,2000);
|
||||
/*!40000 ALTER TABLE `llx_submitew_targets` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `llx_submitew_targets_params`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `llx_submitew_targets_params`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `llx_submitew_targets_params` (
|
||||
`rowid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`fk_target` int(11) NOT NULL,
|
||||
`paramkey` varchar(16) NOT NULL,
|
||||
`paramvalue` varchar(128) DEFAULT '',
|
||||
PRIMARY KEY (`rowid`),
|
||||
UNIQUE KEY `idx_submitewtargets_fk_target` (`fk_target`),
|
||||
UNIQUE KEY `uk_submitewtargets_params` (`fk_target`,`paramkey`,`paramvalue`),
|
||||
CONSTRAINT `fk_submitewtargets_fk_target` FOREIGN KEY (`fk_target`) REFERENCES `llx_submitew_targets` (`rowid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `llx_submitew_targets_params`
|
||||
--
|
||||
|
||||
LOCK TABLES `llx_submitew_targets_params` WRITE;
|
||||
/*!40000 ALTER TABLE `llx_submitew_targets_params` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `llx_submitew_targets_params` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `llx_texts`
|
||||
--
|
||||
|
||||
@@ -188,7 +188,6 @@ export list="
|
||||
--ignore-table=$base.llx_cabinetmed_examenprescrit
|
||||
--ignore-table=$base.llx_cabinetmed_motifcons
|
||||
--ignore-table=$base.llx_cabinetmed_patient
|
||||
--ignore-table=$base.llx_cabinetmed_societe
|
||||
--ignore-table=$base.llx_publi_c_contact_list
|
||||
--ignore-table=$base.llx_publi_c_dnd_list
|
||||
--ignore-table=$base.llx_publi_c_method_list
|
||||
|
||||
|
Before Width: | Height: | Size: 36 KiB |
21
dev/phpcheckstyle/README
Normal file
@@ -0,0 +1,21 @@
|
||||
README (English)
|
||||
--------------------------------
|
||||
|
||||
This directory contains example of PHPCheckStyle configuration
|
||||
to use for quality assurance on PHP developpement.
|
||||
|
||||
To run PHPCheckstyle in eclipse, you must:
|
||||
- install plugin PHP Tools integration http://www.phpsrc.org/eclipse/pti/
|
||||
- Unzip PHPCheckStyle archive into a directory.
|
||||
- Go in Eclipse - Window - Preferences - Dynamic Languages - Validator
|
||||
Choose External PHP Script,
|
||||
Set path ro run.php file for localhost
|
||||
Choose a PHP version,
|
||||
Set parameter string with
|
||||
--src %f --config "phpstandard.cfg.xml" --format console
|
||||
Choose php as Filename extension
|
||||
Check Print PHP output to console
|
||||
Then add patern
|
||||
* %f INFO Line:%n - %m Warning
|
||||
* %f WARNING Line:%n - %m Warning
|
||||
* %f ERROR Line:%n - %m Error
|
||||
316
dev/phpcheckstyle/phpstandard.cfg.xml
Normal file
@@ -0,0 +1,316 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE phpstandard SYSTEM "phpstandard.dtd">
|
||||
<!-- somewhat inspired by java checkstyle -->
|
||||
<phpcheckstyle-configuration>
|
||||
|
||||
<!-- **************** -->
|
||||
<!-- Naming -->
|
||||
<!-- **************** -->
|
||||
|
||||
<!-- Check Constant Naming -->
|
||||
<!-- Disabled to avoid warning with $sql="SELECT ..."
|
||||
<test name="constantNaming" regexp="/^[A-Z_][A-Z_]*[A-Z_]$/" level="ERROR"/>
|
||||
-->
|
||||
|
||||
<!-- Check Variable Naming -->
|
||||
<test name="variableNaming" regexp="/^[a-zA-Z_][a-zA-Z0-9_]*$/" />
|
||||
|
||||
<!-- Check Function Naming -->
|
||||
<test name="functionNaming" regexp="/^[a-z_]/" level="WARNING"/>
|
||||
|
||||
<!-- Check Private Function Naming -->
|
||||
<test name="privateFunctionNaming" regexp="/^[a-z_]/" level="ERROR"/>
|
||||
|
||||
<!-- Checks the constuctor naming -->
|
||||
<!-- old = old style (constructor = name of the class) -->
|
||||
<!-- new = "__construct()" -->
|
||||
<test name="constructorNaming">
|
||||
<property name="naming" value="old"/>
|
||||
</test>
|
||||
|
||||
<!-- Check Class Naming -->
|
||||
<test name="classNaming" regexp="/^[A-Z]/" level="WARNING"/>
|
||||
|
||||
|
||||
<!-- **************** -->
|
||||
<!-- PHP Tags -->
|
||||
<!-- **************** -->
|
||||
|
||||
|
||||
<!-- Test if a short php code open tag is used (? instead of ?php ). -->
|
||||
<test name="noShortPhpCodeTag"/>
|
||||
|
||||
<!-- Test if a PHP closing file is present at the end of a file -->
|
||||
<!-- <test name="noFileCloseTag"/> -->
|
||||
|
||||
<!-- Test if a file finish with some inner HTML (OK for some view but could provoque "header already sent" error) -->
|
||||
<!-- <test name="noFileFinishHTML" level="ERROR" /> -->
|
||||
|
||||
|
||||
<!-- **************** -->
|
||||
<!-- Comments -->
|
||||
<!-- **************** -->
|
||||
|
||||
<!-- Check if some C style comments are used (#) -->
|
||||
<test name="noShellComments"/>
|
||||
|
||||
<!-- Tests that every function and class is immediately preceded by a docblock. A property "excludePrivateMembers" can be set if you want to disable docblocks for private member functions. -->
|
||||
<test name="docBlocks">
|
||||
<property name="excludePrivateMembers" value="true"/>
|
||||
<property name="testReturn" value="true"/>
|
||||
<property name="testParam" value="true"/>
|
||||
<property name="testThrow" value="true"/>
|
||||
</test>
|
||||
|
||||
|
||||
<!-- **************** -->
|
||||
<!-- Indentation -->
|
||||
<!-- **************** -->
|
||||
|
||||
<!-- Tests to make sure that a line does not contain the tab character. -->
|
||||
<!-- <test name="noTabs"/> -->
|
||||
|
||||
<!-- Test to make sure that every control structure is included within a {} block, even if it is syntactically optional. -->
|
||||
<!-- <test name="controlStructNeedCurly"/> -->
|
||||
|
||||
<!-- Check the position of the open curly brace in a control structure (if) -->
|
||||
<!-- sl = same line -->
|
||||
<!-- nl = new line -->
|
||||
<test name="controlStructOpenCurly">
|
||||
<property name="position" value="nl"/>
|
||||
</test>
|
||||
|
||||
<!-- Check the position of the close curly brace -->
|
||||
<test name="controlCloseCurly" level="INFO">
|
||||
</test>
|
||||
|
||||
<!-- Check the position of the open curly brace after a function -->
|
||||
<!-- sl = same line -->
|
||||
<!-- nl = new line -->
|
||||
<test name="funcDefinitionOpenCurly">
|
||||
<property name="position" value="nl"/>
|
||||
</test>
|
||||
|
||||
<!-- Check the position of the else -->
|
||||
<!-- sl = same line -->
|
||||
<!-- nl = new line -->
|
||||
<test name="controlStructElse">
|
||||
<property name="position" value="nl"/>
|
||||
</test>
|
||||
|
||||
|
||||
<!-- **************** -->
|
||||
<!-- Spaces -->
|
||||
<!-- **************** -->
|
||||
|
||||
<!-- Tests that the control statements ("if", "else", "while", "for", etc.)
|
||||
are followed by a space before the opening parenthesis.
|
||||
PEAR standard stipulates this to distinguish it from function calls.
|
||||
-->
|
||||
<!--
|
||||
<test name="spaceAfterControlStmt"/>
|
||||
-->
|
||||
|
||||
<!-- Check that there is no space after a function name in a function call -->
|
||||
<!-- <test name="noSpaceAfterFunctionName" level="INFO"></test> -->
|
||||
|
||||
|
||||
<!-- Check for the (required) presence of a white space after some tokens (like ,) -->
|
||||
<!--
|
||||
<test name="checkWhiteSpaceAfter">
|
||||
<exception value="."/>
|
||||
</test>
|
||||
-->
|
||||
|
||||
<!-- Check for the (required) presence of a white space before some tokens -->
|
||||
<!--
|
||||
<test name="checkWhiteSpaceBefore">
|
||||
<exception value="."/>
|
||||
<exception value=":"/>
|
||||
</test>
|
||||
-->
|
||||
|
||||
<!-- Check that there is no space before before some tokens -->
|
||||
<!--
|
||||
<test name="noSpaceBeforeToken" level="INFO">
|
||||
</test>
|
||||
-->
|
||||
|
||||
<!-- Check that there is no space after some tokens -->
|
||||
<!--
|
||||
<test name="noSpaceAfterToken" level="INFO">
|
||||
</test>
|
||||
-->
|
||||
|
||||
<!-- **************** -->
|
||||
<!-- Metrics -->
|
||||
<!-- **************** -->
|
||||
|
||||
<!-- Check that the lenght of the line doesn't pass the max value -->
|
||||
<test name="lineLength" level="INFO">
|
||||
<property name="maxLineLength" value="160"/>
|
||||
</test>
|
||||
|
||||
<!-- Checks that the lenght (in lines) of a function doesn't pass the max value -->
|
||||
<test name="functionLength" level="INFO">
|
||||
<property name="maxLength" value="500"/>
|
||||
</test>
|
||||
|
||||
<!-- Checks for excessive parameters in a function declaration -->
|
||||
<!-- <test name="functionMaxParameters">
|
||||
<property name="maxParameters" value="4"/>
|
||||
</test> -->
|
||||
|
||||
<!-- Check Cyclomatic Complexity -->
|
||||
<!-- see http://www.aivosto.com/project/help/pm-complexity.html -->
|
||||
<test name="cyclomaticComplexity">
|
||||
<!-- Level raising a warning -->
|
||||
<property name="warningLevel" value="10"/>
|
||||
<!-- Level raising an error -->
|
||||
<property name="errorLevel" value="20"/>
|
||||
</test>
|
||||
|
||||
<!-- **************** -->
|
||||
<!-- Other -->
|
||||
<!-- **************** -->
|
||||
|
||||
<!-- All arguments with default values should be at the end -->
|
||||
<test name="defaultValuesOrder"/>
|
||||
|
||||
<!-- Check for prohibited functions -->
|
||||
<!-- @see http://www.php.net/manual/en/indexes.php -->
|
||||
<test name="checkProhibitedFunctions">
|
||||
<item value="echo"/>
|
||||
<item value="system"/>
|
||||
<item value="print_r"/>
|
||||
<item value="var_dump"/>
|
||||
<item value="dl"/>
|
||||
<!--<item value="exec"/>-->
|
||||
<item value="passthru"/>
|
||||
<!-- <item value="delete"/> We disable because of false report when using method delete -->
|
||||
<item value="ereg_replace"/>
|
||||
<item value="ereg"/>
|
||||
<item value="eregi"/>
|
||||
<!-- <item value="copy"/> -->
|
||||
<!-- <item value="fwrite"/> -->
|
||||
</test>
|
||||
|
||||
<!-- Check for prohibited tokens -->
|
||||
<!-- @see http://www.php.net/manual/en/tokens.php -->
|
||||
<test name="checkProhibitedTokens">
|
||||
<item value="T_BAD_CHARACTER"/>
|
||||
<item value="T_DECLARE"/>
|
||||
<item value="T_ENDDECLARE"/>
|
||||
<item value="T_ENDFOR"/>
|
||||
<item value="T_ENDFOREACH"/>
|
||||
<item value="T_ENDIF"/>
|
||||
<item value="T_ENDSWITCH"/>
|
||||
<item value="T_ENDWHILE"/>
|
||||
<item value="T_HALT_COMPILER"/>
|
||||
<item value="T_OLD_FUNCTION"/>
|
||||
<!-- <item value="T_PRINT"/> -->
|
||||
|
||||
<!-- Same thing as the noShortPhpCodeTag rule -->
|
||||
<!-- <item value="T_OPEN_TAG_WITH_ECHO"/> -->
|
||||
|
||||
<!-- <item value="T_INLINE_HTML"/> -->
|
||||
<!-- <item value="T_ECHO"/> -->
|
||||
|
||||
|
||||
</test>
|
||||
|
||||
<!-- Check for silenced errors before function calls (@function) -->
|
||||
<test name="checkSilencedError">
|
||||
<exception value="rename"/> <!-- Exceptions to this rule -->
|
||||
<exception value="mkdir"/>
|
||||
<exception value="chmod"/>
|
||||
</test>
|
||||
|
||||
<!-- Check for encapsed variables inside a String ("$a") -->
|
||||
<test name="encapsedVariablesInsideString">
|
||||
</test>
|
||||
|
||||
<!-- Avoid passing parameters by reference -->
|
||||
<test name="avoidPassingReferences">
|
||||
</test>
|
||||
|
||||
<test name="showTODOs">
|
||||
</test>
|
||||
|
||||
<!-- Use boolean operators (&&) instead of logical operators (AND) -->
|
||||
<test name="useBooleanOperators">
|
||||
</test>
|
||||
|
||||
<!-- Check empty block like if ($a) {} -->
|
||||
<test name="checkEmptyBlock">
|
||||
<!-- <exception value="catch"/> -->
|
||||
</test>
|
||||
|
||||
<!-- Check empty statement ( ;; ) -->
|
||||
<test name="checkEmptyStatement">
|
||||
</test>
|
||||
|
||||
<!-- Check for the presence of heredoc -->
|
||||
<test name="checkHeredoc">
|
||||
</test>
|
||||
|
||||
<!-- Check for braces around code blocs (if, else, elseif, do, while, for, foreach) -->
|
||||
<!--
|
||||
<test name="needBraces">
|
||||
</test>
|
||||
-->
|
||||
|
||||
<!-- Switch need a default value -->
|
||||
<test name="switchNeedDefault">
|
||||
</test>
|
||||
|
||||
<!-- Switch case should have a break -->
|
||||
<!-- <test name="switchCaseNeedBreak">
|
||||
</test> -->
|
||||
|
||||
<!-- Switch default value should be at the end -->
|
||||
<test name="switchDefaultOrder">
|
||||
</test>
|
||||
|
||||
|
||||
<!--
|
||||
Avoid using unary operators (++) inside a control statement
|
||||
With the exception of for iterators, all variable incrementation or decrementation should occur in their own toplevel statement to increase readability.
|
||||
-->
|
||||
<test name="checkUnaryOperator">
|
||||
<exception value="for"/>
|
||||
</test>
|
||||
|
||||
<!--
|
||||
With inner assignments it is difficult to see all places where a variable is set.
|
||||
With the exception of for iterators, all assignments should occur in their own toplevel statement to increase readability.
|
||||
-->
|
||||
<test name="checkInnerAssignment">
|
||||
<exception value="for"/>
|
||||
</test>
|
||||
|
||||
<!-- Detect unused private functions (detecting unused public ones is more difficult) -->
|
||||
<test name="checkUnusedPrivateFunctions">
|
||||
</test>
|
||||
|
||||
<!-- Detect unused variables -->
|
||||
<test name="checkUnusedVariables">
|
||||
</test>
|
||||
|
||||
<!-- Detect unused function parameters -->
|
||||
<test name="checkUnusedFunctionParameters">
|
||||
</test>
|
||||
|
||||
<!-- Only one class declaration per PHP file -->
|
||||
<test name="oneClassPerFile">
|
||||
</test>
|
||||
|
||||
<!-- ******************* -->
|
||||
<!-- Optimisation -->
|
||||
<!-- ******************* -->
|
||||
|
||||
<!-- Only one class declaration per PHP file -->
|
||||
<test name="functionInsideLoop">
|
||||
</test>
|
||||
|
||||
</phpcheckstyle-configuration>
|
||||
13
dev/phpcheckstyle/phpstandard.dtd
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!ELEMENT phpcheckstyle-configuration (test+)>
|
||||
<!ELEMENT test (property*,item*,exception*)>
|
||||
<!ATTLIST test name CDATA "">
|
||||
<!ATTLIST test regexp CDATA "">
|
||||
<!ATTLIST test level CDATA "">
|
||||
<!ELEMENT property (#PCDATA)>
|
||||
<!ATTLIST property value CDATA "">
|
||||
<!ATTLIST property name CDATA "">
|
||||
<!ELEMENT item (#PCDATA)>
|
||||
<!ATTLIST item value CDATA "">
|
||||
<!ELEMENT exception (#PCDATA)>
|
||||
<!ATTLIST exception value CDATA "">
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
#----------------------------------------------------
|
||||
# Script to resize browser window to 1280x1024 to
|
||||
# be able to make size fixed screenshots using
|
||||
# ALT+Print screen.
|
||||
#----------------------------------------------------
|
||||
|
||||
# Syntax
|
||||
if [ "x$1" = "x" ]
|
||||
then
|
||||
echo "resize_windows.sh (list|0x99999999)"
|
||||
fi
|
||||
|
||||
# To list all windows
|
||||
if [ "x$1" = "xlist" ]
|
||||
then
|
||||
wmctrl -l
|
||||
fi
|
||||
|
||||
# To resize a specific window
|
||||
if [ "x$1" != "xlist" -a "x$1" != "x" ]
|
||||
then
|
||||
wmctrl -i -r $1 -e 0,0,0,1280,1024
|
||||
echo Size of windows $1 modified
|
||||
fi
|
||||
|
||||
8
dev/skeletons/build_class_from_table.php
Executable file → Normal file
@@ -120,7 +120,7 @@ else
|
||||
}
|
||||
//var_dump($property);
|
||||
|
||||
// Define substitute fetch/select parameters
|
||||
// Define substitute select parameters
|
||||
$varpropselect="\n";
|
||||
$cleanparam='';
|
||||
$i=0;
|
||||
@@ -313,7 +313,7 @@ foreach($property as $key => $prop)
|
||||
$targetcontent=preg_replace('/\$sql.= " field1=".\(isset\(\$this->field1\)\?"\'".\$this->db->escape\(\$this->field1\)."\'":"null"\).",";/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/\$sql.= " field2=".\(isset\(\$this->field2\)\?"\'".\$this->db->escape\(\$this->field2\)."\'":"null"\)."";/', '', $targetcontent);
|
||||
|
||||
// Substitute fetch/select parameters
|
||||
// Substitute select parameters
|
||||
$targetcontent=preg_replace('/\$sql\.= " t\.field1,";/', $varpropselect, $targetcontent);
|
||||
$targetcontent=preg_replace('/\$sql\.= " t\.field2";/', '', $targetcontent);
|
||||
|
||||
@@ -445,10 +445,6 @@ $targetcontent=preg_replace('/Put here some comments/','Initialy built by build_
|
||||
// Substitute table name
|
||||
$targetcontent=preg_replace('/MAIN_DB_PREFIX."mytable/', 'MAIN_DB_PREFIX."'.$tablenoprefix, $targetcontent);
|
||||
|
||||
// Substitute fetch/select parameters
|
||||
$targetcontent=preg_replace('/\$sql\.= " t\.field1,";/', $varpropselect, $targetcontent);
|
||||
$targetcontent=preg_replace('/\$sql\.= " t\.field2";/', '', $targetcontent);
|
||||
|
||||
// Build file
|
||||
$fp=fopen($outfile,"w");
|
||||
if ($fp)
|
||||
|
||||
@@ -46,7 +46,7 @@ class modMyModule extends DolibarrModules
|
||||
|
||||
// Id for module (must be unique).
|
||||
// Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id).
|
||||
$this->numero = 100000;
|
||||
$this->numero = 10000;
|
||||
// Key text used to identify module (for permissions, menus, etc...)
|
||||
$this->rights_class = 'mymodule';
|
||||
|
||||
@@ -106,7 +106,7 @@ class modMyModule extends DolibarrModules
|
||||
// Constants
|
||||
// List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive)
|
||||
// Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',1),
|
||||
// 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1)
|
||||
// 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0)
|
||||
// );
|
||||
$this->const = array();
|
||||
|
||||
@@ -133,11 +133,7 @@ class modMyModule extends DolibarrModules
|
||||
$this->tabs = array();
|
||||
|
||||
// Dictionnaries
|
||||
if (! isset($conf->mymodule->enabled))
|
||||
{
|
||||
$conf->mymodule=new stdClass();
|
||||
$conf->mymodule->enabled=0;
|
||||
}
|
||||
if (! isset($conf->mymodule->enabled)) $conf->mymodule->enabled=0;
|
||||
$this->dictionnaries=array();
|
||||
/* Example:
|
||||
if (! isset($conf->mymodule->enabled)) $conf->mymodule->enabled=0; // This is to avoid warnings
|
||||
@@ -158,8 +154,14 @@ class modMyModule extends DolibarrModules
|
||||
// Boxes
|
||||
// Add here list of php file(s) stored in core/boxes that contains class to show a box.
|
||||
$this->boxes = array(); // List of boxes
|
||||
$r=0;
|
||||
// Example:
|
||||
//$this->boxes=array(array(0=>array('file'=>'myboxa.php','note'=>'','enabledbydefaulton'=>'Home'),1=>array('file'=>'myboxb.php','note'=>''),2=>array('file'=>'myboxc.php','note'=>'')););
|
||||
/*
|
||||
$this->boxes[$r][1] = "myboxa.php";
|
||||
$r++;
|
||||
$this->boxes[$r][1] = "myboxb.php";
|
||||
$r++;
|
||||
*/
|
||||
|
||||
// Permissions
|
||||
$this->rights = array(); // Permission array used by this module
|
||||
@@ -220,8 +222,8 @@ class modMyModule extends DolibarrModules
|
||||
// $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||
// $this->export_enabled[$r]='1'; // Condition to show export in list (ie: '$user->id==3'). Set to 1 to always show when module is enabled.
|
||||
// $this->export_permission[$r]=array(array("facture","facture","export"));
|
||||
// $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef');
|
||||
// $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product');
|
||||
// $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef');
|
||||
// $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product');
|
||||
// $this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||
// $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture as f, '.MAIN_DB_PREFIX.'facturedet as fd, '.MAIN_DB_PREFIX.'societe as s)';
|
||||
// $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)';
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
// Put here all includes required by your class file
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
|
||||
//require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
|
||||
//require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
|
||||
//require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
|
||||
|
||||
@@ -32,13 +32,13 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
|
||||
/**
|
||||
* Put here description of your class
|
||||
*/
|
||||
class Skeleton_Class extends CommonObject
|
||||
class Skeleton_Class // extends CommonObject
|
||||
{
|
||||
var $db; //!< To store db handler
|
||||
var $error; //!< To return error code (or message)
|
||||
var $errors=array(); //!< To return several error codes (or messages)
|
||||
var $element='skeleton'; //!< Id that identify managed objects
|
||||
var $table_element='skeleton'; //!< Name of table without prefix where object is stored
|
||||
//var $element='skeleton'; //!< Id that identify managed objects
|
||||
//var $table_element='skeleton'; //!< Name of table without prefix where object is stored
|
||||
|
||||
var $id;
|
||||
var $prop1;
|
||||
|
||||
@@ -27,13 +27,12 @@
|
||||
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1');
|
||||
//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
|
||||
//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check anti CSRF attack test
|
||||
//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data
|
||||
//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not check anti POST attack test
|
||||
//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu
|
||||
//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php
|
||||
//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1');
|
||||
//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1');
|
||||
//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no menu to show
|
||||
//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php
|
||||
//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||
//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session)
|
||||
//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session)
|
||||
|
||||
// Change this following line to use the correct relative path (../, ../../, etc)
|
||||
$res=0;
|
||||
@@ -72,17 +71,17 @@ if ($user->societe_id > 0)
|
||||
|
||||
if ($action == 'add')
|
||||
{
|
||||
$object=new Skeleton_Class($db);
|
||||
$object->prop1=$_POST["field1"];
|
||||
$object->prop2=$_POST["field2"];
|
||||
$result=$object->create($user);
|
||||
$myobject=new Skeleton_Class($db);
|
||||
$myobject->prop1=$_POST["field1"];
|
||||
$myobject->prop2=$_POST["field2"];
|
||||
$result=$myobject->create($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
// Creation OK
|
||||
}
|
||||
{
|
||||
// Creation KO
|
||||
$mesg=$object->error;
|
||||
$mesg=$myobject->error;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,22 +119,19 @@ jQuery(document).ready(function() {
|
||||
|
||||
|
||||
// Example 2 : Adding links to objects
|
||||
// The class must extends CommonObject class to have this method available
|
||||
//$somethingshown=$object->showLinkedObjectBlock();
|
||||
$somethingshown=$myobject->showLinkedObjectBlock();
|
||||
|
||||
|
||||
// Example 3 : List of data
|
||||
if ($action == 'list')
|
||||
{
|
||||
$sql = "SELECT";
|
||||
$sql.= " t.rowid,";
|
||||
$sql.= " t.field1,";
|
||||
$sql.= " t.field2";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."mytable as t";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."skeleton as t";
|
||||
$sql.= " WHERE field3 = 'xxx'";
|
||||
$sql.= " ORDER BY field1 ASC";
|
||||
|
||||
print '<table class="noborder">'."\n";
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans('field1'),$_SERVER['PHP_SELF'],'t.field1','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('field2'),$_SERVER['PHP_SELF'],'t.field2','',$param,'',$sortfield,$sortorder);
|
||||
@@ -169,8 +165,6 @@ if ($action == 'list')
|
||||
$error++;
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
print '</table>'."\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
/* Copyright (C) 2007-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2007-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) ---Put here your own copyright and developer email---
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* \file dev/skeletons/skeleton_script.php
|
||||
* \ingroup mymodule
|
||||
* \ingroup mymodule othermodule1 othermodule2
|
||||
* \brief This file is an example for a command line script
|
||||
* Put here some comments
|
||||
*/
|
||||
@@ -34,22 +34,19 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
exit;
|
||||
}
|
||||
|
||||
// Init global variables
|
||||
$version='1.0';
|
||||
// Global variables
|
||||
$version='1.29';
|
||||
$error=0;
|
||||
|
||||
|
||||
// -------------------- START OF YOUR CODE HERE --------------------
|
||||
@set_time_limit(0); // No timeout for this script
|
||||
define('EVEN_IF_ONLY_LOGIN_ALLOWED',1); // Set this define to 0 if you want to lock your script when dolibarr setup is "locked to admin user only".
|
||||
|
||||
// Include and load Dolibarr environment variables
|
||||
// Include Dolibarr environment
|
||||
require_once($path."../../htdocs/master.inc.php");
|
||||
// After this $db, $mysoc, $langs, $conf and $hookmanager are defined (Opened $db handler to database will be closed at end of file).
|
||||
// $user is created but empty.
|
||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||
|
||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||
$langs->load("main"); // To load language file for default language
|
||||
@set_time_limit(0); // No timeout for this script
|
||||
|
||||
// Load user and its permissions
|
||||
$result=$user->fetch('','admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
@@ -161,7 +158,7 @@ else
|
||||
$db->rollback();
|
||||
}
|
||||
|
||||
$db->close(); // Close $db database opened handler
|
||||
$db->close(); // Close database opened handler
|
||||
|
||||
return $error;
|
||||
?>
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
<meta name="author" content="Dolibarr Development Team">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/dolibarrnew/theme/eldy/img/favicon.ico"/>
|
||||
<title>Login Dolibarr 3.4.0-alpha</title>
|
||||
<!-- Includes for JQuery (Ajax library) -->
|
||||
<link rel="stylesheet" type="text/css" href="/dolibarrnew/includes/jquery/css/smoothness/jquery-ui-latest.custom.css" />
|
||||
<link rel="stylesheet" type="text/css" title="default" href="/dolibarrnew/custom/filemanager/css/filemanager.css.php"><!-- Added by module filemanager-->
|
||||
<!-- Includes JS for JQuery -->
|
||||
<script type="text/javascript" src="/dolibarrnew/includes/jquery/js/jquery-latest.min.js"></script>
|
||||
<script type="text/javascript" src="/dolibarrnew/core/js/dst.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/dolibarrnew/theme/eldy/style.css.php?lang=fr_FR" />
|
||||
<!-- HTTP_USER_AGENT = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22 -->
|
||||
</head>
|
||||
<body class="body">
|
||||
|
||||
<center>
|
||||
|
||||
<div class="login_table" align="center">
|
||||
|
||||
<!-- <tr><td colspan="2" valign="middle"> -->
|
||||
<div id="login_line1" align="center">
|
||||
|
||||
<div id="login_left" style="display: inline-block; min-width: 250px; margin: 0 auto;"><center>
|
||||
|
||||
<table class="none" summary="Login pass" cellpadding="2" align="center">
|
||||
|
||||
<!-- Login -->
|
||||
<tr>
|
||||
<td valign="bottom"> <strong><label for="username">Login</label></strong>fds fs df sdf gdsfgsdf r </td>
|
||||
<td valign="bottom" class="nowrap">
|
||||
<input type="text" id="username" name="username" class="flat" size="15" maxlength="40" value="" tabindex="1" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Password -->
|
||||
<tr><td valign="top" class="nowrap"> <strong><label for="password">Mot de passe</label></strong> </td>
|
||||
<td valign="top" class="nowrap">
|
||||
<input id="password" name="password" class="flat" type="password" size="15" maxlength="30" value="" tabindex="2" />
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
</center>
|
||||
</div> <!-- end div left -->
|
||||
|
||||
<!-- </td>
|
||||
<td align="center" valign="middle">-->
|
||||
<div id="login_right" style="display: inline-block; min-width: 250px; margin: 0 auto;">
|
||||
|
||||
<img alt="Logo" title="" src="/dolibarrnew/theme/dolibarr_logo.png" id="img_logo" />
|
||||
|
||||
</div>
|
||||
</div> <!-- end div line1 -->
|
||||
<!--</td>
|
||||
|
||||
</tr>-->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</center>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<!-- END PHP TEMPLATE -->
|
||||
@@ -1,4 +1,4 @@
|
||||
README (English)
|
||||
README (English)
|
||||
--------------------------------
|
||||
|
||||
* Most screen captures and icons are Dolibarr contributions, however,
|
||||
|
||||
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 11 KiB |
14
htdocs/.gitignore
vendored
@@ -1,9 +1,11 @@
|
||||
/test.php
|
||||
/custom*
|
||||
/bootstrap
|
||||
/multicompany
|
||||
/ovh
|
||||
/numberingpack
|
||||
/google
|
||||
/skincoloreditor
|
||||
/extensions*
|
||||
/nltechno*
|
||||
/bootstrap*
|
||||
/google*
|
||||
/multicompany*
|
||||
/numberingpack*
|
||||
/ovh*
|
||||
/pos
|
||||
/ultimatepdf*
|
||||
|
||||
@@ -138,7 +138,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0)
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="constname" value="ADHERENT_LOGIN_NOT_REQUIRED">';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("AdherentLoginRequired").'</td><td>';
|
||||
print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?0:1),1);
|
||||
print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?$conf->global->ADHERENT_LOGIN_NOT_REQUIRED:1),1);
|
||||
print '</td><td align="center" width="80">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||
print "</td></tr>\n";
|
||||
@@ -171,52 +171,29 @@ print '<input type="submit" class="button" value="'.$langs->trans("Update").'" n
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
// Insert subscription into bank account
|
||||
// Insertion cotisations dans compte financier
|
||||
$var=!$var;
|
||||
print '<form action="adherent.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="constname" value="ADHERENT_BANK_USE">';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("MoreActionsOnSubscription").'</td>';
|
||||
$arraychoices=array('0'=>$langs->trans("None"));
|
||||
if (! empty($conf->banque->enabled)) $arraychoices['bankdirect']=$langs->trans("MoreActionBankDirect");
|
||||
if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $arraychoices['invoiceonly']=$langs->trans("MoreActionInvoiceOnly");
|
||||
if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $arraychoices['bankviainvoice']=$langs->trans("MoreActionBankViaInvoice");
|
||||
print '<td>';
|
||||
print $form->selectarray('constvalue',$arraychoices,$conf->global->ADHERENT_BANK_USE,0);
|
||||
print '</td><td align="center" width="80">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||
print '</td>';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("AddSubscriptionIntoAccount").'</td>';
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<td>';
|
||||
print $form->selectyesno('constvalue',$conf->global->ADHERENT_BANK_USE,1);
|
||||
print '</td><td align="center" width="80">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="right" colspan="2">';
|
||||
print $langs->trans("WarningModuleNotActive",$langs->transnoentities("Module85Name")).' '.img_warning("","");
|
||||
print '</td>';
|
||||
}
|
||||
print "</tr>\n";
|
||||
print '</form>';
|
||||
|
||||
// Use vat for invoice creation
|
||||
if ($conf->facture->enabled)
|
||||
{
|
||||
$var=!$var;
|
||||
print '<form action="adherent.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="constname" value="ADHERENT_VAT_FOR_SUBSCRIPTIONS">';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("VATToUseForSubscriptions").'</td>';
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<td>';
|
||||
print $form->selectarray('constvalue', array('0'=>$langs->trans("NoVatOnSubscription"),'defaultforfoundationcountry'=>$langs->trans("Default")), (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS)?'0':$conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS), 0);
|
||||
print '</td><td align="center" width="80">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="right" colspan="2">';
|
||||
print $langs->trans("WarningModuleNotActive",$langs->transnoentities("Module85Name"));
|
||||
print '</td>';
|
||||
}
|
||||
print "</tr>\n";
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
@@ -239,7 +216,7 @@ form_constantes($constantes);
|
||||
|
||||
print '*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
|
||||
print '%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
|
||||
print '%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
|
||||
print '%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %NAISS%, %PHOTO%, %TYPE%, ';
|
||||
print '%YEAR%, %MONTH%, %DAY%';
|
||||
print '<br>';
|
||||
|
||||
@@ -257,7 +234,7 @@ form_constantes($constantes);
|
||||
|
||||
print '*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
|
||||
print '%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
|
||||
print '%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
|
||||
print '%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %NAISS%, %PHOTO%, %TYPE%, ';
|
||||
print '%YEAR%, %MONTH%, %DAY%';
|
||||
print '<br>';
|
||||
|
||||
@@ -287,7 +264,7 @@ form_constantes($constantes);
|
||||
|
||||
print '*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
|
||||
print '%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
|
||||
print '%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
|
||||
print '%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %NAISS%, %PHOTO%, %TYPE%, ';
|
||||
//print '%YEAR%, %MONTH%, %DAY%'; // Not supported
|
||||
print '<br>';
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);
|
||||
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$attrname=GETPOST('attrname', 'alpha');
|
||||
$elementtype='adherent'; //Must be the $table_element of the class that manage extrafield
|
||||
$elementtype='member';
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
|
||||
@@ -68,12 +68,14 @@ print_fiche_titre($langs->trans("MembersSetup"),$linkback,'setup');
|
||||
|
||||
$head = member_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("Members"), 0, 'user');
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("Member"), 0, 'user');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes", $langs->transnoentitiesnoconv("Members")).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
dol_htmloutput_errors($mesg);
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
@@ -103,6 +105,7 @@ foreach($extrafields->attribute_type as $key => $value)
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=".$key."\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
// $i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
@@ -114,15 +117,15 @@ dol_fiche_end();
|
||||
if ($action != 'create' && $action != 'edit')
|
||||
{
|
||||
print '<div class="tabsAction">';
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"]."?action=create\">".$langs->trans("NewAttribute").'</a></div>';
|
||||
print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create\">".$langs->trans("NewAttribute")."</a>";
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Creation d'un champ optionnel */
|
||||
/* */
|
||||
/* Creation d'un champ optionnel
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
if ($action == 'create')
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* 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/adherents/admin/adherent_type_extrafields.php
|
||||
* \ingroup member
|
||||
* \brief Page to setup extra fields of members
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
|
||||
$langs->load("members");
|
||||
$langs->load("admin");
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$form = new Form($db);
|
||||
|
||||
// List of supported format
|
||||
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
|
||||
$type2label=array('');
|
||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);
|
||||
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$attrname=GETPOST('attrname', 'alpha');
|
||||
$elementtype='adherent_type'; //Must be the $table_element of the class that manage extrafield
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/admin_extrafields.inc.php';
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$textobject=$langs->transnoentitiesnoconv("MembersTypes");
|
||||
|
||||
$help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
|
||||
llxHeader('',$langs->trans("MembersSetup"),$help_url);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("MembersSetup"),$linkback,'setup');
|
||||
|
||||
|
||||
$head = member_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes_type', $langs->trans("Members"), 0, 'user');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=".$key."\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
// Buttons
|
||||
if ($action != 'create' && $action != 'edit')
|
||||
{
|
||||
print '<div class="tabsAction">';
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"]."?action=create\">".$langs->trans("NewAttribute").'</a></div>';
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Creation d'un champ optionnel */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
if ($action == 'create')
|
||||
{
|
||||
print "<br>";
|
||||
print_titre($langs->trans('NewAttribute'));
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
|
||||
}
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Edition d'un champ optionnel */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
if ($action == 'edit' && ! empty($attrname))
|
||||
{
|
||||
print "<br>";
|
||||
print_titre($langs->trans("FieldEdition", $attrname));
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||
}
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
@@ -51,17 +51,14 @@ $testunsubscribeemail = GETPOST("testunsubscribeemail");
|
||||
// Action mise a jour ou ajout d'une constante
|
||||
if ($action == 'update' || $action == 'add')
|
||||
{
|
||||
foreach($_POST['constname'] as $key => $val)
|
||||
{
|
||||
$constname=$_POST["constname"][$key];
|
||||
$constvalue=$_POST["constvalue"][$key];
|
||||
$consttype=$_POST["consttype"][$key];
|
||||
$constnote=$_POST["constnote"][$key];
|
||||
$res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
}
|
||||
|
||||
$constname=GETPOST("constname");
|
||||
$constvalue=GETPOST("constvalue");
|
||||
$consttype=GETPOST("consttype");
|
||||
$constnote=GETPOST("constnote");
|
||||
$res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$mesg = '<div class="ok">'.$langs->trans("SetupSaved").'</div>';
|
||||
@@ -162,6 +159,9 @@ dol_fiche_head($head, 'mailman', $langs->trans("Setup"), 0, 'user');
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
|
||||
/*
|
||||
* Mailman
|
||||
*/
|
||||
$var=!$var;
|
||||
if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
||||
{
|
||||
@@ -180,8 +180,6 @@ if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
||||
|
||||
print_fiche_titre($langs->trans('MailmanTitle'), $lien,'');
|
||||
|
||||
print '<br>';
|
||||
|
||||
// JQuery activity
|
||||
print '<script type="text/javascript">
|
||||
var i1=0;
|
||||
@@ -198,7 +196,7 @@ if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
||||
});
|
||||
</script>';
|
||||
|
||||
form_constantes($constantes,1);
|
||||
form_constantes($constantes);
|
||||
|
||||
print '*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
|
||||
print '%LISTE%, %MAILMAN_ADMINPW%, %EMAIL% <br>';
|
||||
@@ -219,12 +217,12 @@ if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="action" value="testsubscribe">';
|
||||
print $langs->trans("TestSubscribe").'<br>';
|
||||
print $langs->trans("EMail").' <input type="email" class="flat" name="testsubscribeemail" value="'.GETPOST('testsubscribeemail').'"> <input class="button" type="submit" value="'.$langs->trans("Test").'"><br>';
|
||||
print $langs->trans("EMail").' <input type="email" name="testsubscribeemail" value="'.GETPOST('testsubscribeemail').'"> <input class="button" type="submit" value="'.$langs->trans("Test").'"><br>';
|
||||
print '</form>';
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="action" value="testunsubscribe">';
|
||||
print $langs->trans("TestUnSubscribe").'<br>';
|
||||
print $langs->trans("EMail").' <input type="email" class="flat" name="testunsubscribeemail" value="'.GETPOST('testunsubscribeemail').'"> <input class="button" type="submit" value="'.$langs->trans("Test").'"><br>';
|
||||
print $langs->trans("EMail").' <input type="email" name="testunsubscribeemail" value="'.GETPOST('testunsubscribeemail').'"> <input class="button" type="submit" value="'.$langs->trans("Test").'"><br>';
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,13 +48,11 @@ if ($action == 'update')
|
||||
$amount=GETPOST('MEMBER_NEWFORM_AMOUNT');
|
||||
$editamount=GETPOST('MEMBER_NEWFORM_EDITAMOUNT');
|
||||
$payonline=GETPOST('MEMBER_NEWFORM_PAYONLINE');
|
||||
$email=GETPOST('MEMBER_PAYONLINE_SENDEMAIL');
|
||||
|
||||
$res=dolibarr_set_const($db, "MEMBER_ENABLE_PUBLIC",$public,'chaine',0,'',$conf->entity);
|
||||
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_AMOUNT",$amount,'chaine',0,'',$conf->entity);
|
||||
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_EDITAMOUNT",$editamount,'chaine',0,'',$conf->entity);
|
||||
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_PAYONLINE",$payonline,'chaine',0,'',$conf->entity);
|
||||
$res=dolibarr_set_const($db, "MEMBER_PAYONLINE_SENDEMAIL",$email,'chaine',0,'',$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
@@ -92,39 +90,22 @@ if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print 'jQuery(document).ready(function () {
|
||||
function initemail()
|
||||
{
|
||||
if (jQuery("#MEMBER_NEWFORM_PAYONLINE").val()==\'-1\')
|
||||
{
|
||||
jQuery("#tremail").hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery("#tremail").show();
|
||||
}
|
||||
}
|
||||
function initfields()
|
||||
{
|
||||
if (jQuery("#MEMBER_ENABLE_PUBLIC").val()==\'0\')
|
||||
if (jQuery("#MEMBER_ENABLE_PUBLIC").val()==\'0\')
|
||||
{
|
||||
jQuery("#tramount").hide();
|
||||
jQuery("#tredit").hide();
|
||||
jQuery("#trpayment").hide();
|
||||
jQuery("#tremail").hide();
|
||||
jQuery(".drag").hide();
|
||||
}
|
||||
if (jQuery("#MEMBER_ENABLE_PUBLIC").val()==\'1\')
|
||||
{
|
||||
jQuery("#tramount").show();
|
||||
jQuery("#tredit").show();
|
||||
jQuery("#trpayment").show();
|
||||
if (jQuery("#MEMBER_NEWFORM_PAYONLINE").val()==\'-1\') jQuery("#tremail").hide();
|
||||
else jQuery("#tremail").show();
|
||||
}
|
||||
}
|
||||
initfields();
|
||||
jQuery("#MEMBER_ENABLE_PUBLIC").change(function() { initfields(); });
|
||||
jQuery("#MEMBER_NEWFORM_PAYONLINE").change(function() { initemail(); });
|
||||
})';
|
||||
jQuery(".drag").show();
|
||||
}
|
||||
}
|
||||
initfields();
|
||||
jQuery("#MEMBER_ENABLE_PUBLIC").change(function() {
|
||||
initfields();
|
||||
});
|
||||
})';
|
||||
print '</script>'."\n";
|
||||
}
|
||||
|
||||
@@ -138,7 +119,7 @@ print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Value").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
$var=true;
|
||||
|
||||
@@ -147,14 +128,14 @@ $var=! $var;
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("EnablePublicSubscriptionForm");
|
||||
print '</td><td align="right">';
|
||||
print '</td><td width="60" align="right">';
|
||||
print $form->selectyesno("MEMBER_ENABLE_PUBLIC",(! empty($conf->global->MEMBER_ENABLE_PUBLIC)?$conf->global->MEMBER_ENABLE_PUBLIC:0),1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Type
|
||||
/*$var=! $var;
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr '.$bc[$var].' class="drag"><td>';
|
||||
print '<tr '.$bcdd[$var].'><td>';
|
||||
print $langs->trans("EnablePublicSubscriptionForm");
|
||||
print '</td><td width="60" align="center">';
|
||||
print $form->selectyesno("forcedate",$conf->global->MEMBER_NEWFORM_FORCETYPE,1);
|
||||
@@ -163,43 +144,32 @@ print "</td></tr>\n"; */
|
||||
// Amount
|
||||
$var=! $var;
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr '.$bc[$var].' id="tramount"><td>';
|
||||
print '<tr '.$bcdd[$var].'><td>';
|
||||
print $langs->trans("DefaultAmount");
|
||||
print '</td><td align="right">';
|
||||
print '</td><td width="60" align="right">';
|
||||
print '<input type="text" id="MEMBER_NEWFORM_AMOUNT" name="MEMBER_NEWFORM_AMOUNT" size="5" value="'.(! empty($conf->global->MEMBER_NEWFORM_AMOUNT)?$conf->global->MEMBER_NEWFORM_AMOUNT:'').'">';;
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Can edit
|
||||
$var=! $var;
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr '.$bc[$var].' id="tredit"><td>';
|
||||
print '<tr '.$bcdd[$var].'><td>';
|
||||
print $langs->trans("CanEditAmount");
|
||||
print '</td><td align="right">';
|
||||
print '</td><td width="60" align="right">';
|
||||
print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT",(! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)?$conf->global->MEMBER_NEWFORM_EDITAMOUNT:0),1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled))
|
||||
{
|
||||
// Jump to an online payment page
|
||||
$var=! $var;
|
||||
print '<tr '.$bc[$var].' id="trpayment"><td>';
|
||||
print $langs->trans("MEMBER_NEWFORM_PAYONLINE");
|
||||
print '</td><td align="right">';
|
||||
$listofval=array();
|
||||
if (! empty($conf->paybox->enabled)) $listofval['paybox']='Paybox';
|
||||
if (! empty($conf->paypal->enabled)) $listofval['paypal']='PayPal';
|
||||
print $form->selectarray("MEMBER_NEWFORM_PAYONLINE",$listofval,(! empty($conf->global->MEMBER_NEWFORM_PAYONLINE)?$conf->global->MEMBER_NEWFORM_PAYONLINE:''),1);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled))
|
||||
{
|
||||
// Jump to an online payment page
|
||||
$var=! $var;
|
||||
print '<tr '.$bc[$var].' id="tremail"><td>';
|
||||
print $langs->trans("MEMBER_PAYONLINE_SENDEMAIL");
|
||||
print '</td><td align="right">';
|
||||
print '<input type="text" id="MEMBER_PAYONLINE_SENDEMAIL" name="MEMBER_PAYONLINE_SENDEMAIL" size="24" value="'.(! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL)?$conf->global->MEMBER_PAYONLINE_SENDEMAIL:'').'">';;
|
||||
print '<tr '.$bcdd[$var].'><td>';
|
||||
print $langs->trans("MEMBER_NEWFORM_PAYONLINE");
|
||||
print '</td><td width="60" align="right">';
|
||||
$listofval=array();
|
||||
if (! empty($conf->paybox->enabled)) $listofval['paybox']='Paybox';
|
||||
if (! empty($conf->paypal->enabled)) $listofval['paypal']='PayPal';
|
||||
print $form->selectarray("MEMBER_NEWFORM_PAYONLINE",$listofval,(! empty($conf->global->MEMBER_NEWFORM_PAYONLINE)?$conf->global->MEMBER_NEWFORM_PAYONLINE:''),1);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +139,6 @@ if (! empty($conf->global->ADHERENT_USE_SPIP))
|
||||
);
|
||||
|
||||
print_fiche_titre($langs->trans('SPIPTitle'), $lien, '');
|
||||
print '<br>';
|
||||
form_constantes($constantes);
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
@@ -139,7 +139,9 @@ if ($object->id > 0)
|
||||
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create">'.$langs->trans("AddAction").'</a></div>';
|
||||
// FIXME socid parameters is not valid, a member is not a thirparty
|
||||
//print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&socid='.$socid.'">'.$langs->trans("AddAction").'</a>';
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create">'.$langs->trans("AddAction").'</a>';
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
@@ -286,10 +286,10 @@ abstract class ActionsAdherentCardCommon
|
||||
}
|
||||
|
||||
// Zip
|
||||
$this->tpl['select_zip'] = $formcompany->select_ziptown($this->object->zip,'zipcode',array('town','selectcountry_id','state_id'),6);
|
||||
$this->tpl['select_zip'] = $formcompany->select_ziptown($this->object->zip,'zipcode',array('town','selectcountry_id','departement_id'),6);
|
||||
|
||||
// Town
|
||||
$this->tpl['select_town'] = $formcompany->select_ziptown($this->object->town,'town',array('zipcode','selectcountry_id','state_id'));
|
||||
$this->tpl['select_town'] = $formcompany->select_ziptown($this->object->town,'town',array('zipcode','selectcountry_id','departement_id'));
|
||||
|
||||
if (dol_strlen(trim($this->object->country_id)) == 0) $this->object->country_id = $objsoc->country_id;
|
||||
|
||||
@@ -300,7 +300,7 @@ abstract class ActionsAdherentCardCommon
|
||||
if ($user->admin) $this->tpl['info_admin'] = info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
||||
|
||||
// State
|
||||
if ($this->object->country_id) $this->tpl['select_state'] = $formcompany->select_state($this->object->state_id,$this->object->country_code);
|
||||
if ($this->object->country_id) $this->tpl['select_state'] = $formcompany->select_state($this->object->fk_departement,$this->object->country_code);
|
||||
else $this->tpl['select_state'] = $countrynotdefined;
|
||||
|
||||
// Physical or Moral
|
||||
@@ -364,10 +364,10 @@ abstract class ActionsAdherentCardCommon
|
||||
|
||||
if ($action == 'create_user')
|
||||
{
|
||||
// Full firstname and lastname separated with a dot : firstname.lastname
|
||||
// Full firstname and name separated with a dot : firstname.name
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
||||
$login=dol_buildlogin($this->object->lastname, $this->object->firstname);
|
||||
$login=dol_buildlogin($this->object->nom, $this->object->prenom);
|
||||
|
||||
$generated_password=getRandomPassword('');
|
||||
$password=$generated_password;
|
||||
@@ -394,14 +394,16 @@ abstract class ActionsAdherentCardCommon
|
||||
$this->object->old_firstname = $_POST["old_firstname"];
|
||||
|
||||
$this->object->fk_soc = $_POST["fk_soc"];
|
||||
$this->object->lastname = $_POST["lastname"];
|
||||
$this->object->name = $_POST["name"];
|
||||
$this->object->firstname = $_POST["firstname"];
|
||||
$this->object->civilite_id = $_POST["civilite_id"];
|
||||
$this->object->address = $_POST["address"];
|
||||
$this->object->zip = $_POST["zipcode"];
|
||||
$this->object->town = $_POST["town"];
|
||||
$this->object->fk_pays = $_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id;
|
||||
$this->object->fk_departement = $_POST["departement_id"];
|
||||
$this->object->country_id = $_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id;
|
||||
$this->object->state_id = $_POST["state_id"];
|
||||
$this->object->state_id = $_POST["departement_id"];
|
||||
$this->object->phone_perso = $_POST["phone_perso"];
|
||||
$this->object->phone_mobile = $_POST["phone_mobile"];
|
||||
$this->object->email = $_POST["email"];
|
||||
@@ -421,6 +423,8 @@ abstract class ActionsAdherentCardCommon
|
||||
{
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
$this->object->pays_code = $obj->code;
|
||||
$this->object->pays = $langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle;
|
||||
$this->object->country_code = $obj->code;
|
||||
$this->object->country = $langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']
|
||||
|
||||
<tr>
|
||||
<td><?php echo $langs->trans("Zip").' / '.$langs->trans("Town"); ?></td>
|
||||
<td colspan="3"><?php echo $this->control->tpl['zip'].$this->control->tpl['town']; ?></td>
|
||||
<td colspan="3"><?php echo $this->control->tpl['zip'].$this->control->tpl['ville']; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@@ -76,7 +76,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']
|
||||
|
||||
<tr>
|
||||
<td><?php echo $langs->trans('State'); ?></td>
|
||||
<td colspan="3"><?php echo $this->control->tpl['state']; ?></td>
|
||||
<td colspan="3"><?php echo $this->control->tpl['departement']; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
@@ -362,11 +362,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $
|
||||
|
||||
// Add line to draft invoice
|
||||
$idprodsubscription=0;
|
||||
$vattouse=0;
|
||||
if (isset($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) && $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS == 'defaultforfoundationcountry')
|
||||
{
|
||||
$vattouse=get_default_tva($mysoc, $mysoc, $idprodsubscription);
|
||||
}
|
||||
$vattouse=get_default_tva($mysoc, $customer, $idprodsubscription);
|
||||
//print xx".$vattouse." - ".$mysoc." - ".$customer;exit;
|
||||
$result=$invoice->addline($invoice->id,$label,0,1,$vattouse,0,0,$idprodsubscription,0,$datecotisation,$datesubend,0,0,'','TTC',$cotisation,1);
|
||||
if ($result <= 0)
|
||||
@@ -479,6 +475,8 @@ if ($rowid)
|
||||
{
|
||||
$res=$object->fetch($rowid);
|
||||
if ($res < 0) { dol_print_error($db,$object->error); exit; }
|
||||
//$res=$object->fetch_optionals($object->id,$extralabels);
|
||||
//if ($res < 0) { dol_print_error($db); exit; }
|
||||
|
||||
$adht->fetch($object->typeid);
|
||||
|
||||
@@ -503,7 +501,7 @@ if ($rowid)
|
||||
print $form->showrefnav($object, 'rowid', $linkback);
|
||||
print '</td></tr>';
|
||||
|
||||
$showphoto='<td rowspan="'.$rowspan.'" class="hideonsmartphone" align="center" valign="middle" width="25%">'.$form->showphoto('memberphoto',$object).'</td>';
|
||||
$showphoto='<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">'.$form->showphoto('memberphoto',$object).'</td>';
|
||||
|
||||
// Login
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
@@ -640,8 +638,8 @@ if ($rowid)
|
||||
{
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if ($object->statut > 0) print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$rowid.'&action=addsubscription">'.$langs->trans("AddSubscription")."</a></div>";
|
||||
else print '<div class="inline-block divButAction"><a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("AddSubscription").'</a></div>';
|
||||
if ($object->statut > 0) print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$rowid.'&action=addsubscription">'.$langs->trans("AddSubscription")."</a>";
|
||||
else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("AddSubscription").'</a>';
|
||||
|
||||
print "<br>\n";
|
||||
|
||||
@@ -656,9 +654,8 @@ if ($rowid)
|
||||
*/
|
||||
if ($action != 'addsubscription' && $action != 'create_thirdparty')
|
||||
{
|
||||
$sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe,";
|
||||
$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe,";
|
||||
$sql.= " c.rowid as crowid, c.cotisation,";
|
||||
$sql.= " c.datec,";
|
||||
$sql.= " c.dateadh,";
|
||||
$sql.= " c.datef,";
|
||||
$sql.= " c.fk_bank,";
|
||||
@@ -682,8 +679,7 @@ if ($rowid)
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Ref").'</td>';
|
||||
print '<td align="center">'.$langs->trans("DateCreation").'</td>';
|
||||
print '<td align="center">'.$langs->trans("DateStart").'</td>';
|
||||
print '<td align="center">'.$langs->trans("DateSubscription").'</td>';
|
||||
print '<td align="center">'.$langs->trans("DateEnd").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
||||
if (! empty($conf->banque->enabled))
|
||||
@@ -701,7 +697,6 @@ if ($rowid)
|
||||
$cotisationstatic->ref=$objp->crowid;
|
||||
$cotisationstatic->id=$objp->crowid;
|
||||
print '<td>'.$cotisationstatic->getNomUrl(1).'</td>';
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->datec),'dayhour')."</td>\n";
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->dateadh),'day')."</td>\n";
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->datef),'day')."</td>\n";
|
||||
print '<td align="right">'.price($objp->cotisation).'</td>';
|
||||
@@ -761,9 +756,9 @@ if ($rowid)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankviainvoice' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled) && $object->fk_soc) $bankviainvoice=1;
|
||||
else if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && ! empty($conf->banque->enabled)) $bankdirect=1;
|
||||
else if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled) && $object->fk_soc) $invoiceonly=1;
|
||||
if (! empty($conf->global->ADHERENT_BANK_USE) && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled) && $object->fk_soc) $bankviainvoice=1;
|
||||
else if (! empty($conf->global->ADHERENT_BANK_USE) && ! empty($conf->banque->enabled)) $bankdirect=1;
|
||||
else if (empty($conf->global->ADHERENT_BANK_USE) && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled) && $object->fk_soc) $invoiceonly=1;
|
||||
}
|
||||
|
||||
print "\n\n<!-- Form add subscription -->\n";
|
||||
@@ -830,7 +825,7 @@ if ($rowid)
|
||||
print '<input type="hidden" name="action" value="cotisation">';
|
||||
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
||||
print '<input type="hidden" name="memberlabel" id="memberlabel" value="'.dol_escape_htmltag($object->getFullName($langs)).'">';
|
||||
print '<input type="hidden" name="thirdpartylabel" id="thirdpartylabel" value="'.dol_escape_htmltag($object->societe).'">';
|
||||
print '<input type="hidden" name="thirdpartylabel" id="thirdpartylabel" value="'.dol_escape_htmltag($object->name).'">';
|
||||
print "<table class=\"border\" width=\"100%\">\n";
|
||||
|
||||
$today=dol_now();
|
||||
@@ -900,18 +895,16 @@ if ($rowid)
|
||||
// Title payments
|
||||
//print '<tr><td colspan="2"><b>'.$langs->trans("Payment").'</b></td></tr>';
|
||||
|
||||
// No more action
|
||||
// Define a way to write payment
|
||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans('MoreActions');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print '<input type="radio" class="moreaction" id="none" name="paymentsave" value="none"'.(empty($bankdirect) && empty($invoiceonly) && empty($bankviainvoice)?' checked="checked"':'').'> '.$langs->trans("None").'<br>';
|
||||
// Add entry into bank accoun
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<input type="radio" class="moreaction" id="bankdirect" name="paymentsave" value="bankdirect"'.(! empty($bankdirect)?' checked="checked"':'');
|
||||
print '> '.$langs->trans("MoreActionBankDirect").'<br>';
|
||||
}
|
||||
// Add invoice with no payments
|
||||
if (! empty($conf->societe->enabled) && ! empty($conf->facture->enabled))
|
||||
{
|
||||
print '<input type="radio" class="moreaction" id="invoiceonly" name="paymentsave" value="invoiceonly"'.(! empty($invoiceonly)?' checked="checked"':'');
|
||||
@@ -919,16 +912,14 @@ if ($rowid)
|
||||
print '> '.$langs->trans("MoreActionInvoiceOnly");
|
||||
if ($object->fk_soc) print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')';
|
||||
else
|
||||
{
|
||||
{
|
||||
print ' ('.$langs->trans("NoThirdPartyAssociatedToMember");
|
||||
print ' - <a href="'.$_SERVER["PHP_SELF"].'?rowid='.$object->id.'&action=create_thirdparty">';
|
||||
print $langs->trans("CreateDolibarrThirdParty");
|
||||
print '</a>)';
|
||||
}
|
||||
if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. '.$langs->trans("NoVatOnSubscription",0).'.';
|
||||
print '<br>';
|
||||
}
|
||||
// Add invoice with payments
|
||||
if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled))
|
||||
{
|
||||
print '<input type="radio" class="moreaction" id="bankviainvoice" name="paymentsave" value="bankviainvoice"'.(! empty($bankviainvoice)?' checked="checked"':'');
|
||||
@@ -936,13 +927,12 @@ if ($rowid)
|
||||
print '> '.$langs->trans("MoreActionBankViaInvoice");
|
||||
if ($object->fk_soc) print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')';
|
||||
else
|
||||
{
|
||||
{
|
||||
print ' ('.$langs->trans("NoThirdPartyAssociatedToMember");
|
||||
print ' - <a href="'.$_SERVER["PHP_SELF"].'?rowid='.$object->id.'&action=create_thirdparty">';
|
||||
print $langs->trans("CreateDolibarrThirdParty");
|
||||
print '</a>)';
|
||||
}
|
||||
if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. '.$langs->trans("NoVatOnSubscription",0).'.';
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
@@ -1035,4 +1025,4 @@ else
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -61,12 +61,12 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
|
||||
$arrayofmembers=array();
|
||||
|
||||
// requete en prenant que les adherents a jour de cotisation
|
||||
$sql = "SELECT d.rowid, d.firstname, d.lastname, d.login, d.societe as company, d.datefin,";
|
||||
$sql.= " d.address, d.zip, d.town, d.country, d.birth, d.email, d.photo,";
|
||||
$sql = "SELECT d.rowid, d.prenom as firstname, d.nom as lastname, d.login, d.societe as company, d.datefin,";
|
||||
$sql.= " d.adresse as address, d.cp as zip, d.ville as town, d.naiss, d.email, d.photo,";
|
||||
$sql.= " t.libelle as type,";
|
||||
$sql.= " p.code as country_code, p.libelle as country";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t, ".MAIN_DB_PREFIX."adherent as d";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p ON d.country = p.rowid";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p ON d.pays = p.rowid";
|
||||
$sql.= " WHERE d.fk_adherent_type = t.rowid AND d.statut = 1";
|
||||
if (is_numeric($foruserid)) $sql.=" AND d.rowid=".$foruserid;
|
||||
if ($foruserlogin) $sql.=" AND d.login='".$db->escape($foruserlogin)."'";
|
||||
@@ -101,14 +101,23 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
|
||||
'%COUNTRY%'=>$objp->country,
|
||||
'%COUNTRY_CODE%'=>$objp->country_code,
|
||||
'%EMAIL%'=>$objp->email,
|
||||
'%BIRTH%'=>dol_print_date($objp->birth,'day'),
|
||||
'%NAISS%'=>dol_print_date($objp->naiss,'day'),
|
||||
'%TYPE%'=>$objp->type,
|
||||
'%YEAR%'=>$year,
|
||||
'%MONTH%'=>$month,
|
||||
'%DAY%'=>$day,
|
||||
'%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT,
|
||||
'%SERVER%'=>"http://".$_SERVER["SERVER_NAME"]."/",
|
||||
'%SOCIETE%'=>$objp->company
|
||||
'%SERVER%'=>"http://".$_SERVER["SERVER_NAME"]."/", // deprecated
|
||||
// For backward compatibility
|
||||
'%PRENOM%'=>$objp->firstname,
|
||||
'%NOM%'=>$objp->lastname,
|
||||
'%SOCIETE%'=>$objp->company,
|
||||
'%ADRESSE%'=>$objp->address,
|
||||
'%CP%'=>$objp->zip,
|
||||
'%VILLE%'=>$objp->town,
|
||||
'%PAYS%'=>$objp->country,
|
||||
'%ANNEE%'=>$year,
|
||||
'%SERVEUR%'=>"http://".$_SERVER["SERVER_NAME"]."/" // deprecated
|
||||
);
|
||||
complete_substitutions_array($substitutionarray, $langs);
|
||||
|
||||
|
||||
@@ -41,30 +41,36 @@ class Adherent extends CommonObject
|
||||
public $table_element='adherent';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
var $error;
|
||||
var $errors;
|
||||
var $mesgs;
|
||||
|
||||
var $id;
|
||||
var $ref;
|
||||
var $civilite_id;
|
||||
var $firstname;
|
||||
var $prenom; // deprecated
|
||||
var $lastname;
|
||||
var $nom; // deprecated
|
||||
var $login;
|
||||
var $pass;
|
||||
var $societe;
|
||||
var $company;
|
||||
var $adresse;
|
||||
var $address;
|
||||
var $cp;
|
||||
var $zip;
|
||||
var $ville;
|
||||
var $town;
|
||||
|
||||
var $state_id; // Id of department
|
||||
var $state_code; // Code of department
|
||||
var $state; // Label of department
|
||||
var $fk_departement; // deprecated
|
||||
var $departement_code; // deprecated
|
||||
var $departement; // deprecated
|
||||
|
||||
var $country_id;
|
||||
var $country_code;
|
||||
var $country;
|
||||
var $pays_id; // deprecated
|
||||
var $pays_code; // deprecated
|
||||
var $pays; // deprecated
|
||||
|
||||
var $email;
|
||||
var $phone;
|
||||
@@ -81,7 +87,7 @@ class Adherent extends CommonObject
|
||||
var $datem;
|
||||
var $datefin;
|
||||
var $datevalid;
|
||||
var $birth;
|
||||
var $naiss;
|
||||
|
||||
var $typeid; // Id type adherent
|
||||
var $type; // Libelle type adherent
|
||||
@@ -179,7 +185,7 @@ class Adherent extends CommonObject
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
$birthday = dol_print_date($this->birth,'day');
|
||||
$birthday = dol_print_date($this->naiss,'day');
|
||||
|
||||
$msgishtml = 0;
|
||||
if (dol_textishtml($text,1)) $msgishtml = 1;
|
||||
@@ -218,15 +224,16 @@ class Adherent extends CommonObject
|
||||
'%TOWN%'=>$msgishtml?dol_htmlentitiesbr($this->town):$this->town,
|
||||
'%COUNTRY%'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country,
|
||||
'%EMAIL%'=>$msgishtml?dol_htmlentitiesbr($this->email):$this->email,
|
||||
'%BIRTH%'=>$msgishtml?dol_htmlentitiesbr($birthday):$birthday,
|
||||
'%NAISS%'=>$msgishtml?dol_htmlentitiesbr($birthday):$birthday,
|
||||
'%PHOTO%'=>$msgishtml?dol_htmlentitiesbr($this->photo):$this->photo,
|
||||
'%LOGIN%'=>$msgishtml?dol_htmlentitiesbr($this->login):$this->login,
|
||||
'%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass,
|
||||
// For backward compatibility
|
||||
'%INFOS%'=>$msgishtml?dol_htmlentitiesbr($infos):$infos,
|
||||
'%SOCIETE%'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe,
|
||||
'%PRENOM%'=>$msgishtml?dol_htmlentitiesbr($this->firstname):$this->firstname,
|
||||
'%NOM%'=>$msgishtml?dol_htmlentitiesbr($this->lastname):$this->lastname,
|
||||
'%SOCIETE%'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe,
|
||||
'%ADRESSE%'=>$msgishtml?dol_htmlentitiesbr($this->address):$this->address,
|
||||
'%CP%'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip,
|
||||
'%VILLE%'=>$msgishtml?dol_htmlentitiesbr($this->town):$this->town,
|
||||
'%PAYS%'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country,
|
||||
@@ -387,21 +394,21 @@ class Adherent extends CommonObject
|
||||
*/
|
||||
function update($user,$notrigger=0,$nosyncuser=0,$nosyncuserpass=0,$nosyncthirdparty=0,$action='update')
|
||||
{
|
||||
global $conf, $langs, $hookmanager;
|
||||
global $conf, $langs;
|
||||
|
||||
$nbrowsaffected=0;
|
||||
$error=0;
|
||||
|
||||
dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncuser=".$nosyncuser.", nosyncuserpass=".$nosyncuserpass." nosyncthirdparty=".$nosyncthirdparty.", email=".$this->email);
|
||||
dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncuser=".$nosyncuser.", nosyncuserpass=".$nosyncuserpass.", email=".$this->email);
|
||||
|
||||
// Clean parameters
|
||||
$this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->lastname);
|
||||
$this->firstname=trim($this->firstname)?trim($this->firstname):trim($this->firstname);
|
||||
$this->address=($this->address?$this->address:$this->address);
|
||||
$this->zip=($this->zip?$this->zip:$this->zip);
|
||||
$this->town=($this->town?$this->town:$this->town);
|
||||
$this->country_id=($this->country_id > 0?$this->country_id:$this->country_id);
|
||||
$this->state_id=($this->state_id > 0?$this->state_id:$this->state_id);
|
||||
$this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->nom);
|
||||
$this->firstname=trim($this->firstname)?trim($this->firstname):trim($this->prenom);
|
||||
$this->address=($this->address?$this->address:$this->adresse);
|
||||
$this->zip=($this->zip?$this->zip:$this->cp);
|
||||
$this->town=($this->town?$this->town:$this->ville);
|
||||
$this->country_id=($this->country_id > 0?$this->country_id:$this->fk_pays);
|
||||
$this->state_id=($this->state_id > 0?$this->state_id:$this->fk_departement);
|
||||
if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname=ucwords(trim($this->lastname));
|
||||
if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords(trim($this->firstname));
|
||||
|
||||
@@ -417,16 +424,16 @@ class Adherent extends CommonObject
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
|
||||
$sql.= " civilite = ".(!is_null($this->civilite_id)?"'".$this->civilite_id."'":"null");
|
||||
$sql.= ", firstname = ".($this->firstname?"'".$this->db->escape($this->firstname)."'":"null");
|
||||
$sql.= ", lastname=" .($this->lastname?"'".$this->db->escape($this->lastname)."'":"null");
|
||||
$sql.= ", prenom = ".($this->firstname?"'".$this->db->escape($this->firstname)."'":"null");
|
||||
$sql.= ", nom=" .($this->lastname?"'".$this->db->escape($this->lastname)."'":"null");
|
||||
$sql.= ", login=" .($this->login?"'".$this->db->escape($this->login)."'":"null");
|
||||
$sql.= ", societe=" .($this->societe?"'".$this->db->escape($this->societe)."'":"null");
|
||||
$sql.= ", fk_soc=" .($this->fk_soc > 0?"'".$this->fk_soc."'":"null");
|
||||
$sql.= ", address=" .($this->address?"'".$this->db->escape($this->address)."'":"null");
|
||||
$sql.= ", zip=" .($this->zip?"'".$this->db->escape($this->zip)."'":"null");
|
||||
$sql.= ", town=" .($this->town?"'".$this->db->escape($this->town)."'":"null");
|
||||
$sql.= ", country=".($this->country_id>0?"'".$this->country_id."'":"null");
|
||||
$sql.= ", state_id=".($this->state_id>0?"'".$this->state_id."'":"null");
|
||||
$sql.= ", adresse=" .($this->address?"'".$this->db->escape($this->address)."'":"null");
|
||||
$sql.= ", cp=" .($this->zip?"'".$this->db->escape($this->zip)."'":"null");
|
||||
$sql.= ", ville=" .($this->town?"'".$this->db->escape($this->town)."'":"null");
|
||||
$sql.= ", pays=" .($this->country_id>0?"'".$this->country_id."'":"null");
|
||||
$sql.= ", fk_departement=".($this->state_id>0?"'".$this->state_id."'":"null");
|
||||
$sql.= ", email='".$this->email."'";
|
||||
$sql.= ", phone=" .($this->phone?"'".$this->db->escape($this->phone)."'":"null");
|
||||
$sql.= ", phone_perso=" .($this->phone_perso?"'".$this->db->escape($this->phone_perso)."'":"null");
|
||||
@@ -437,7 +444,7 @@ class Adherent extends CommonObject
|
||||
$sql.= ", statut=" .$this->statut;
|
||||
$sql.= ", fk_adherent_type=".$this->typeid;
|
||||
$sql.= ", morphy='".$this->morphy."'";
|
||||
$sql.= ", birth=" .($this->birth?"'".$this->db->idate($this->birth)."'":"null");
|
||||
$sql.= ", naiss=" .($this->naiss?"'".$this->db->idate($this->naiss)."'":"null");
|
||||
if ($this->datefin) $sql.= ", datefin='".$this->db->idate($this->datefin)."'"; // Ne doit etre modifie que par effacement cotisation
|
||||
if ($this->datevalid) $sql.= ", datevalid='".$this->db->idate($this->datevalid)."'"; // Ne doit etre modifie que par validation adherent
|
||||
$sql.= ", fk_user_mod=".($user->id>0?$user->id:'null'); // Can be null because member can be create by a guest
|
||||
@@ -455,6 +462,8 @@ class Adherent extends CommonObject
|
||||
$nbrowsaffected+=$this->db->affected_rows($resql);
|
||||
|
||||
// Actions on extra fields (by external module)
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||
$hookmanager=new HookManager($this->db);
|
||||
$hookmanager->initHooks(array('memberdao'));
|
||||
$parameters=array('id'=>$this->id);
|
||||
$action='';
|
||||
@@ -519,6 +528,8 @@ class Adherent extends CommonObject
|
||||
$luser->civilite_id=$this->civilite_id;
|
||||
$luser->firstname=$this->firstname;
|
||||
$luser->lastname=$this->lastname;
|
||||
$luser->prenom=$this->firstname; // deprecated
|
||||
$luser->nom=$this->lastname; // deprecated
|
||||
$luser->login=$this->user_login;
|
||||
$luser->pass=$this->pass;
|
||||
$luser->societe_id=$this->societe;
|
||||
@@ -565,7 +576,7 @@ class Adherent extends CommonObject
|
||||
$lthirdparty->tel=$this->phone;
|
||||
$lthirdparty->state_id=$this->state_id;
|
||||
$lthirdparty->country_id=$this->country_id;
|
||||
$lthirdparty->country_id=$this->country_id;
|
||||
$lthirdparty->pays_id=$this->country_id;
|
||||
//$lthirdparty->phone_mobile=$this->phone_mobile;
|
||||
|
||||
$result=$lthirdparty->update($this->fk_soc,$user,0,1,1,'update'); // Use sync to 0 to avoid cyclic updates
|
||||
@@ -690,9 +701,6 @@ class Adherent extends CommonObject
|
||||
$error=0;
|
||||
$errorflag=0;
|
||||
|
||||
// Check parameters
|
||||
if (empty($rowid)) $rowid=$this->id;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Remove category
|
||||
@@ -940,7 +948,7 @@ class Adherent extends CommonObject
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Remove link to third party onto any other members
|
||||
// Update link to third party
|
||||
if ($thirdpartyid > 0)
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET fk_soc = null";
|
||||
@@ -950,7 +958,7 @@ class Adherent extends CommonObject
|
||||
$resql = $this->db->query($sql);
|
||||
}
|
||||
|
||||
// Add link to third party for current member
|
||||
// Update link to third party
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET fk_soc = ".($thirdpartyid>0 ? $thirdpartyid : 'null');
|
||||
$sql.= " WHERE rowid = ".$this->id;
|
||||
|
||||
@@ -1013,23 +1021,23 @@ class Adherent extends CommonObject
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$sql = "SELECT d.rowid, d.ref_ext, d.civilite, d.firstname, d.lastname, d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.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.photo, d.fk_adherent_type, d.morphy, d.entity,";
|
||||
$sql.= " d.datec as datec,";
|
||||
$sql.= " d.tms as datem,";
|
||||
$sql.= " d.datefin as datefin,";
|
||||
$sql.= " d.birth as birthday,";
|
||||
$sql.= " d.naiss as datenaiss,";
|
||||
$sql.= " d.datevalid as datev,";
|
||||
$sql.= " d.country,";
|
||||
$sql.= " d.state_id,";
|
||||
$sql.= " d.pays,";
|
||||
$sql.= " d.fk_departement,";
|
||||
$sql.= " p.rowid as country_id, p.code as country_code, p.libelle as country,";
|
||||
$sql.= " dep.nom as state, dep.code_departement as state_code,";
|
||||
$sql.= " t.libelle as type, t.cotisation as cotisation,";
|
||||
$sql.= " u.rowid as user_id, u.login as user_login";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t, ".MAIN_DB_PREFIX."adherent as d";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p ON d.country = p.rowid";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as dep ON d.state_id = dep.rowid";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p ON d.pays = p.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.= " WHERE d.fk_adherent_type = t.rowid";
|
||||
if ($rowid) $sql.= " AND d.rowid=".$rowid;
|
||||
@@ -1050,22 +1058,28 @@ class Adherent extends CommonObject
|
||||
$this->entity = $obj->entity;
|
||||
$this->ref = $obj->rowid;
|
||||
$this->id = $obj->rowid;
|
||||
$this->ref_ext = $obj->ref_ext;
|
||||
$this->civilite_id = $obj->civilite;
|
||||
$this->prenom = $obj->firstname; // deprecated
|
||||
$this->firstname = $obj->firstname;
|
||||
$this->nom = $obj->lastname; // deprecated
|
||||
$this->lastname = $obj->lastname;
|
||||
$this->login = $obj->login;
|
||||
$this->pass = $obj->pass;
|
||||
$this->societe = $obj->company;
|
||||
$this->company = $obj->company;
|
||||
$this->societe = $obj->societe;
|
||||
$this->fk_soc = $obj->fk_soc;
|
||||
$this->adresse = $obj->address; // deprecated
|
||||
$this->address = $obj->address;
|
||||
$this->cp = $obj->zip; // deprecated
|
||||
$this->zip = $obj->zip;
|
||||
$this->ville = $obj->town; // deprecated
|
||||
$this->town = $obj->town;
|
||||
|
||||
$this->state_id = $obj->state_id;
|
||||
$this->state_code = $obj->state_id?$obj->state_code:'';
|
||||
$this->state = $obj->state_id?$obj->state:'';
|
||||
$this->state_id = $obj->fk_departement;
|
||||
$this->state_code = $obj->fk_departement?$obj->state_code:'';
|
||||
$this->state = $obj->fk_departement?$obj->state:'';
|
||||
$this->fk_departement = $obj->fk_departement; // deprecated
|
||||
$this->departement_code = $obj->fk_departement?$obj->state_code:''; // deprecated
|
||||
$this->departement = $obj->fk_departement?$obj->state:''; // deprecated
|
||||
|
||||
$this->country_id = $obj->country_id;
|
||||
$this->country_code = $obj->country_code;
|
||||
@@ -1073,6 +1087,9 @@ class Adherent extends CommonObject
|
||||
$this->country = $langs->transnoentitiesnoconv("Country".$obj->country_code);
|
||||
else
|
||||
$this->country=$obj->country;
|
||||
$this->pays_id = $obj->country_id; // deprecated
|
||||
$this->pays_code = $obj->country_code; // deprecated
|
||||
$this->pays = $this->country; // deprecated
|
||||
|
||||
$this->phone = $obj->phone;
|
||||
$this->phone_perso = $obj->phone_perso;
|
||||
@@ -1087,7 +1104,7 @@ class Adherent extends CommonObject
|
||||
$this->datem = $this->db->jdate($obj->datem);
|
||||
$this->datefin = $this->db->jdate($obj->datefin);
|
||||
$this->datevalid = $this->db->jdate($obj->datev);
|
||||
$this->birth = $this->db->jdate($obj->birthday);
|
||||
$this->naiss = $this->db->jdate($obj->datenaiss);
|
||||
|
||||
$this->note = $obj->note;
|
||||
$this->morphy = $obj->morphy;
|
||||
@@ -1099,15 +1116,6 @@ class Adherent extends CommonObject
|
||||
$this->user_id = $obj->user_id;
|
||||
$this->user_login = $obj->user_login;
|
||||
|
||||
// Retreive all extrafield for thirdparty
|
||||
// fetch optionals attributes and labels
|
||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php');
|
||||
$extrafields=new ExtraFields($this->db);
|
||||
$extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
|
||||
if (count($extralabels)>0) {
|
||||
$this->fetch_optionals($this->id,$extralabels);
|
||||
}
|
||||
|
||||
// Load other properties
|
||||
$result=$this->fetch_subscriptions();
|
||||
|
||||
@@ -1195,7 +1203,7 @@ class Adherent extends CommonObject
|
||||
* Insert subscription into database and eventually add links to banks, mailman, etc...
|
||||
*
|
||||
* @param timestamp $date Date d'effet de la cotisation
|
||||
* @param amount $montant Montant cotisation (accepte 0 pour les adherents non soumis a cotisation)
|
||||
* @param amount $montant Montant cotisation (accepte 0 pour les adherents non soumis e cotisation)
|
||||
* @param int $accountid Id compte bancaire
|
||||
* @param string $operation Type operation (si Id compte bancaire fourni)
|
||||
* @param string $label Label operation (si Id compte bancaire fourni)
|
||||
@@ -1380,17 +1388,17 @@ class Adherent extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* Fonction qui ajoute l'adherent aux abonnements automatiques mailing-list, spip, etc.
|
||||
* Fonction qui ajoute l'adherent au abonnements automatiques mailing-list, spip, etc.
|
||||
* TODO Move this into member creation trigger (trigger of mailmanspip module)
|
||||
*
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function add_to_abo()
|
||||
{
|
||||
global $conf,$langs;
|
||||
global $conf;
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php';
|
||||
$mailmanspip=new MailmanSpip($this->db);
|
||||
$mailmanspip=new MailmanSpip($db);
|
||||
|
||||
$err=0;
|
||||
|
||||
@@ -1403,16 +1411,6 @@ class Adherent extends CommonObject
|
||||
$this->error=$mailmanspip->error;
|
||||
$err+=1;
|
||||
}
|
||||
foreach ($mailmanspip->mladded_ko as $tmplist => $tmpemail)
|
||||
{
|
||||
$langs->load("errors");
|
||||
$this->errors[]=$langs->trans("ErrorFailedToAddToMailmanList",$tmpemail,$tmplist);
|
||||
}
|
||||
foreach ($mailmanspip->mladded_ok as $tmplist => $tmpemail)
|
||||
{
|
||||
$langs->load("mailmanspip");
|
||||
$this->mesgs[]=$langs->trans("SuccessToAddToMailmanList",$tmpemail,$tmplist);
|
||||
}
|
||||
}
|
||||
|
||||
// spip
|
||||
@@ -1427,10 +1425,11 @@ class Adherent extends CommonObject
|
||||
}
|
||||
if ($err)
|
||||
{
|
||||
// error
|
||||
return -$err;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1444,10 +1443,10 @@ class Adherent extends CommonObject
|
||||
*/
|
||||
function del_to_abo()
|
||||
{
|
||||
global $conf,$langs;
|
||||
global $conf;
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php';
|
||||
$mailmanspip=new MailmanSpip($this->db);
|
||||
$mailmanspip=new MailmanSpip($db);
|
||||
|
||||
$err=0;
|
||||
|
||||
@@ -1457,20 +1456,8 @@ class Adherent extends CommonObject
|
||||
$result=$mailmanspip->del_to_mailman($this);
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->error=$mailmanspip->error;
|
||||
$err+=1;
|
||||
}
|
||||
|
||||
foreach ($mailmanspip->mlremoved_ko as $tmplist => $tmpemail)
|
||||
{
|
||||
$langs->load("errors");
|
||||
$this->errors[]=$langs->trans("ErrorFailedToRemoveToMailmanList",$tmpemail,$tmplist);
|
||||
}
|
||||
foreach ($mailmanspip->mlremoved_ok as $tmplist => $tmpemail)
|
||||
{
|
||||
$langs->load("mailmanspip");
|
||||
$this->mesgs[]=$langs->trans("SuccessToRemoveToMailmanList",$tmpemail,$tmplist);
|
||||
}
|
||||
}
|
||||
|
||||
if ($conf->global->ADHERENT_USE_SPIP && ! empty($conf->mailmanspip->enabled))
|
||||
@@ -1494,18 +1481,19 @@ class Adherent extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* Return civility label of a member
|
||||
* Return label of a civility of a contact
|
||||
*
|
||||
* @return string Translated name of civility
|
||||
* @param int $nohtmlentities 0=Encode with htmlentities for HTML output, 1=No htmlentities for memory translation
|
||||
* @return string Name translated of civility
|
||||
*/
|
||||
function getCivilityLabel()
|
||||
function getCivilityLabel($nohtmlentities=0)
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("dict");
|
||||
|
||||
$code=(! empty($this->civilite_id)?$this->civilite_id:(! empty($this->civility_id)?$this->civility_id:''));
|
||||
if (empty($code)) return '';
|
||||
return $langs->getLabelFromKey($this->db, "Civility".$code, "c_civilite", "code", "civilite", $code);
|
||||
global $langs;
|
||||
$langs->load("dict");
|
||||
|
||||
$code=$this->civilite_id;
|
||||
if ($nohtmlentities) return $langs->transnoentities("Civility".$code)!="Civility".$code ? $langs->transnoentities("Civility".$code) : $code;
|
||||
else return $langs->trans("Civility".$code)!="Civility".$code ? $langs->trans("Civility".$code) : $code;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1532,11 +1520,6 @@ class Adherent extends CommonObject
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/card_subscriptions.php?rowid='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
if ($option == 'category')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=3">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
|
||||
$picto='user';
|
||||
$label=$langs->trans("ShowMember");
|
||||
@@ -1547,6 +1530,40 @@ class Adherent extends CommonObject
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return full address of member
|
||||
*
|
||||
* @param int $withcountry 1=Add country into address string
|
||||
* @param string $sep Separator to use to build string
|
||||
* @return string Full address string
|
||||
*/
|
||||
function getFullAddress($withcountry=0,$sep="\n")
|
||||
{
|
||||
$ret='';
|
||||
if ($withcountry && $this->country_id && (empty($this->country_code) || empty($this->country)))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/lib/company.lib.php';
|
||||
$tmparray=getCountry($this->country_id,'all');
|
||||
$this->country_code=$tmparray['code'];
|
||||
$this->country =$tmparray['label'];
|
||||
}
|
||||
|
||||
if (in_array($this->country_code,array('US')))
|
||||
{
|
||||
$ret.=($this->address?$this->address.$sep:'');
|
||||
$ret.=trim($this->zip.' '.$this->town);
|
||||
if ($withcountry) $ret.=($this->country?$sep.$this->country:'');
|
||||
}
|
||||
else
|
||||
{
|
||||
$ret.=($this->address?$this->address.$sep:'');
|
||||
$ret.=trim($this->zip.' '.$this->town);
|
||||
if ($withcountry) $ret.=($this->country?$sep.$this->country:'');
|
||||
}
|
||||
return trim($ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne le libelle du statut d'un adherent (brouillon, valide, resilie)
|
||||
*
|
||||
@@ -1631,11 +1648,11 @@ class Adherent extends CommonObject
|
||||
if ($statut == -1) return $langs->trans("MemberStatusDraft").' '.img_picto($langs->trans('MemberStatusDraft'),'statut0');
|
||||
if ($statut >= 1)
|
||||
{
|
||||
if (! $date_end_subscription) return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusActive").' </span>'.img_picto($langs->trans('MemberStatusActive'),'statut1');
|
||||
elseif ($date_end_subscription < time()) return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusActiveLate").' </span>'.img_picto($langs->trans('MemberStatusActiveLate'),'statut3');
|
||||
else return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusPaid").' </span>'.img_picto($langs->trans('MemberStatusPaid'),'statut4');
|
||||
if (! $date_end_subscription) return $langs->trans("MemberStatusActive").' '.img_picto($langs->trans('MemberStatusActive'),'statut1');
|
||||
elseif ($date_end_subscription < time()) return $langs->trans("MemberStatusActiveLate").' '.img_picto($langs->trans('MemberStatusActiveLate'),'statut3');
|
||||
else return $langs->trans("MemberStatusPaid").' '.img_picto($langs->trans('MemberStatusPaid'),'statut4');
|
||||
}
|
||||
if ($statut == 0) return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusResiliated").' </span>'.img_picto($langs->trans('MemberStatusResiliated'),'statut5');
|
||||
if ($statut == 0) return $langs->trans("MemberStatusResiliated").' '.img_picto($langs->trans('MemberStatusResiliated'),'statut5');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1747,7 +1764,7 @@ class Adherent extends CommonObject
|
||||
$this->phone_perso = '0999999998';
|
||||
$this->phone_mobile = '0999999997';
|
||||
$this->note='No comment';
|
||||
$this->birth=time();
|
||||
$this->naiss=time();
|
||||
$this->photo='';
|
||||
$this->public=1;
|
||||
$this->statut=0;
|
||||
@@ -1804,14 +1821,14 @@ class Adherent extends CommonObject
|
||||
|
||||
// Member
|
||||
if ($this->fullname && ! empty($conf->global->LDAP_MEMBER_FIELD_FULLNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FULLNAME] = $this->fullname;
|
||||
if ($this->lastname && ! empty($conf->global->LDAP_MEMBER_FIELD_NAME)) $info[$conf->global->LDAP_MEMBER_FIELD_NAME] = $this->lastname;
|
||||
if ($this->firstname && ! empty($conf->global->LDAP_MEMBER_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->firstname;
|
||||
if ($this->nom && ! empty($conf->global->LDAP_MEMBER_FIELD_NAME)) $info[$conf->global->LDAP_MEMBER_FIELD_NAME] = $this->nom;
|
||||
if ($this->prenom && ! empty($conf->global->LDAP_MEMBER_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->prenom;
|
||||
if ($this->login && ! empty($conf->global->LDAP_MEMBER_FIELD_LOGIN)) $info[$conf->global->LDAP_MEMBER_FIELD_LOGIN] = $this->login;
|
||||
if ($this->pass && ! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte
|
||||
if ($this->poste && ! empty($conf->global->LDAP_MEMBER_FIELD_TITLE)) $info[$conf->global->LDAP_MEMBER_FIELD_TITLE] = $this->poste;
|
||||
if ($this->address && ! empty($conf->global->LDAP_MEMBER_FIELD_ADDRESS)) $info[$conf->global->LDAP_MEMBER_FIELD_ADDRESS] = $this->address;
|
||||
if ($this->zip && ! empty($conf->global->LDAP_MEMBER_FIELD_ZIP)) $info[$conf->global->LDAP_MEMBER_FIELD_ZIP] = $this->zip;
|
||||
if ($this->town && ! empty($conf->global->LDAP_MEMBER_FIELD_TOWN)) $info[$conf->global->LDAP_MEMBER_FIELD_TOWN] = $this->town;
|
||||
if ($this->adresse && ! empty($conf->global->LDAP_MEMBER_FIELD_ADDRESS)) $info[$conf->global->LDAP_MEMBER_FIELD_ADDRESS] = $this->adresse;
|
||||
if ($this->cp && ! empty($conf->global->LDAP_MEMBER_FIELD_ZIP)) $info[$conf->global->LDAP_MEMBER_FIELD_ZIP] = $this->cp;
|
||||
if ($this->ville && ! empty($conf->global->LDAP_MEMBER_FIELD_TOWN)) $info[$conf->global->LDAP_MEMBER_FIELD_TOWN] = $this->ville;
|
||||
if ($this->country_code && ! empty($conf->global->LDAP_MEMBER_FIELD_COUNTRY)) $info[$conf->global->LDAP_MEMBER_FIELD_COUNTRY] = $this->country_code;
|
||||
if ($this->email && ! empty($conf->global->LDAP_MEMBER_FIELD_MAIL)) $info[$conf->global->LDAP_MEMBER_FIELD_MAIL] = $this->email;
|
||||
if ($this->phone && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE] = $this->phone;
|
||||
@@ -1819,7 +1836,7 @@ class Adherent extends CommonObject
|
||||
if ($this->phone_mobile && ! empty($conf->global->LDAP_MEMBER_FIELD_MOBILE)) $info[$conf->global->LDAP_MEMBER_FIELD_MOBILE] = $this->phone_mobile;
|
||||
if ($this->fax && ! empty($conf->global->LDAP_MEMBER_FIELD_FAX)) $info[$conf->global->LDAP_MEMBER_FIELD_FAX] = $this->fax;
|
||||
if ($this->note && ! empty($conf->global->LDAP_MEMBER_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_MEMBER_FIELD_DESCRIPTION] = $this->note;
|
||||
if ($this->birth && ! empty($conf->global->LDAP_MEMBER_FIELD_BIRTHDATE)) $info[$conf->global->LDAP_MEMBER_FIELD_BIRTHDATE] = dol_print_date($this->birth,'dayhourldap');
|
||||
if ($this->naiss && ! empty($conf->global->LDAP_MEMBER_FIELD_BIRTHDATE)) $info[$conf->global->LDAP_MEMBER_FIELD_BIRTHDATE] = dol_print_date($this->naiss,'dayhourldap');
|
||||
if (isset($this->statut) && ! empty($conf->global->LDAP_FIELD_MEMBER_STATUS)) $info[$conf->global->LDAP_FIELD_MEMBER_STATUS] = $this->statut;
|
||||
if ($this->datefin && ! empty($conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION)) $info[$conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION] = dol_print_date($this->datefin,'dayhourldap');
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
||||
class AdherentType extends CommonObject
|
||||
{
|
||||
public $table_element = 'adherent_type';
|
||||
public $element = 'adherent_type';
|
||||
|
||||
var $id;
|
||||
var $libelle;
|
||||
@@ -44,6 +43,7 @@ class AdherentType extends CommonObject
|
||||
var $mail_valid; //mail envoye lors de la validation
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@@ -99,8 +99,6 @@ class AdherentType extends CommonObject
|
||||
*/
|
||||
function update($user)
|
||||
{
|
||||
global $hookmanager;
|
||||
|
||||
$this->libelle=trim($this->libelle);
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent_type ";
|
||||
@@ -116,24 +114,6 @@ class AdherentType extends CommonObject
|
||||
$result = $this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
// Actions on extra fields (by external module or standard code)
|
||||
$hookmanager->initHooks(array('membertypedao'));
|
||||
$parameters=array('membertype'=>$this->id);
|
||||
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
if (empty($reshook))
|
||||
{
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||
{
|
||||
$result=$this->insertExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ($reshook < 0) $error++;
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -46,8 +46,8 @@ if (! $sortfield) { $sortfield="c.dateadh"; }
|
||||
$msg='';
|
||||
$date_select=isset($_GET["date_select"])?$_GET["date_select"]:$_POST["date_select"];
|
||||
|
||||
// Security check
|
||||
$result=restrictedArea($user,'adherent','','','cotisation');
|
||||
// Security check
|
||||
$result=restrictedArea($user,'adherent','','','cotisation');
|
||||
|
||||
|
||||
/*
|
||||
@@ -64,7 +64,7 @@ llxHeader('',$langs->trans("ListOfSubscriptions"),'EN:Module_Foundations|FR:Modu
|
||||
if ($msg) print $msg.'<br>';
|
||||
|
||||
// Liste des cotisations
|
||||
$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe,";
|
||||
$sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.nom as lastname, d.societe,";
|
||||
$sql.= " c.rowid as crowid, c.cotisation,";
|
||||
$sql.= " c.dateadh,";
|
||||
$sql.= " c.datef,";
|
||||
@@ -88,8 +88,6 @@ if ($result)
|
||||
|
||||
$title=$langs->trans("ListOfSubscriptions");
|
||||
if (! empty($date_select)) $title.=' ('.$langs->trans("Year").' '.$date_select.')';
|
||||
|
||||
$param="";
|
||||
$param.="&statut=$statut&date_select=$date_select";
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num);
|
||||
|
||||
@@ -98,7 +96,7 @@ if ($result)
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),"cotisations.php","c.rowid",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Name"),"cotisations.php","d.lastname",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Name"),"cotisations.php","d.nom",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Login"),"cotisations.php","d.login",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"),"cotisations.php","c.note",$param,"",'align="left"',$sortfield,$sortorder);
|
||||
if (! empty($conf->banque->enabled))
|
||||
@@ -143,7 +141,7 @@ if ($result)
|
||||
// Ref
|
||||
print '<td>'.$cotisation->getNomUrl(1).'</td>';
|
||||
|
||||
// Lastname
|
||||
// Nom
|
||||
print '<td>'.$adherent->getNomUrl(1).'</td>';
|
||||
|
||||
// Login
|
||||
|
||||
@@ -93,15 +93,15 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$object=new Adherent($db);
|
||||
$member=new Adherent($db);
|
||||
$membert=new AdherentType($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
if ($id > 0)
|
||||
{
|
||||
$result=$object->fetch($id);
|
||||
$result=$membert->fetch($object->typeid);
|
||||
$result=$member->fetch($id);
|
||||
$result=$membert->fetch($member->typeid);
|
||||
if ($result > 0)
|
||||
{
|
||||
/*
|
||||
@@ -110,7 +110,7 @@ if ($id > 0)
|
||||
if (! empty($conf->notification->enabled))
|
||||
$langs->load("mails");
|
||||
|
||||
$head = member_prepare_head($object);
|
||||
$head = member_prepare_head($member);
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
@@ -133,19 +133,19 @@ if ($id > 0)
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td class="valeur">';
|
||||
print $form->showrefnav($object, 'rowid', $linkback);
|
||||
print $form->showrefnav($member, 'rowid', $linkback);
|
||||
print '</td></tr>';
|
||||
|
||||
// Login
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$member->login.' </td></tr>';
|
||||
}
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$member->getmorphylib().'</td>';
|
||||
/*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
|
||||
print $form->showphoto('memberphoto',$object);
|
||||
print $form->showphoto('memberphoto',$member);
|
||||
print '</td>';*/
|
||||
print '</tr>';
|
||||
|
||||
@@ -153,22 +153,22 @@ if ($id > 0)
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$membert->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Company
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$member->societe.'</td></tr>';
|
||||
|
||||
// Civility
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$member->getCivilityLabel().' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Lastname
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$object->lastname.' </td>';
|
||||
// Nom
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$member->lastname.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$object->firstname.' </td>';
|
||||
// Prenom
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$member->firstname.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$object->getLibStatut(4).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$member->getLibStatut(4).'</td></tr>';
|
||||
|
||||
// Nbre fichiers
|
||||
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
@@ -185,18 +185,18 @@ if ($id > 0)
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode(GETPOST("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>';
|
||||
}
|
||||
|
||||
|
||||
// Affiche formulaire upload
|
||||
$formfile=new FormFile($db);
|
||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/adherents/document.php?id='.$object->id,'',0,0,$user->rights->adherent->creer,50,$object);
|
||||
$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
|
||||
$formfile->list_of_documents($filearray,$object,'member','', 0, get_exdir($object->id,2,0,1).'/'.$object->id.'/');
|
||||
$formfile->list_of_documents($filearray,$member,'member','', 0, get_exdir($member->id,2,0,1).'/'.$member->id.'/');
|
||||
|
||||
print "<br><br>";
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2012 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
*
|
||||
* 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
|
||||
@@ -64,11 +64,8 @@ if (! empty($conf->mailmanspip->enabled))
|
||||
$object = new Adherent($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
// Get object canvas (By default, this is not defined, so standard usage of dolibarr)
|
||||
$object->getCanvas($rowid);
|
||||
$object->getCanvas($socid);
|
||||
$canvas = $object->canvas?$object->canvas:GETPOST("canvas");
|
||||
$objcanvas='';
|
||||
if (! empty($canvas))
|
||||
@@ -101,15 +98,17 @@ if ($rowid > 0)
|
||||
}
|
||||
}
|
||||
|
||||
// Define variables to determine what the current user can do on the members
|
||||
// Define variables to know what current user can do on members
|
||||
$canaddmember=$user->rights->adherent->creer;
|
||||
// Define variables to determine what the current user can do on the properties of a member
|
||||
// Define variables to know what current user can do on properties of a member
|
||||
if ($rowid)
|
||||
{
|
||||
$caneditfieldmember=$user->rights->adherent->creer;
|
||||
}
|
||||
|
||||
// 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';
|
||||
$hookmanager=new HookManager($db);
|
||||
$hookmanager->initHooks(array('membercard'));
|
||||
|
||||
|
||||
@@ -117,7 +116,7 @@ $hookmanager->initHooks(array('membercard'));
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$parameters=array('rowid'=>$rowid, 'objcanvas'=>$objcanvas);
|
||||
$parameters=array('socid'=>$socid, 'objcanvas'=>$objcanvas);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
if ($action == 'setuserid' && ($user->rights->user->self->creer || $user->rights->user->user->creer))
|
||||
@@ -239,51 +238,45 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
$birthdate='';
|
||||
if (isset($_POST["birthday"]) && $_POST["birthday"]
|
||||
&& isset($_POST["birthmonth"]) && $_POST["birthmonth"]
|
||||
&& isset($_POST["birthyear"]) && $_POST["birthyear"])
|
||||
$datenaiss='';
|
||||
if (isset($_POST["naissday"]) && $_POST["naissday"]
|
||||
&& isset($_POST["naissmonth"]) && $_POST["naissmonth"]
|
||||
&& isset($_POST["naissyear"]) && $_POST["naissyear"])
|
||||
{
|
||||
$birthdate=dol_mktime(12, 0, 0, $_POST["birthmonth"], $_POST["birthday"], $_POST["birthyear"]);
|
||||
}
|
||||
$lastname=$_POST["lastname"];
|
||||
$firstname=$_POST["firstname"];
|
||||
$morphy=$morphy=$_POST["morphy"];;
|
||||
if ($morphy != 'mor' && empty($lastname)) {
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname"))."<br>\n";
|
||||
}
|
||||
if ($morphy != 'mor' && (!isset($firstname) || $firstname=='')) {
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname"))."<br>\n";
|
||||
$datenaiss=dol_mktime(12, 0, 0, $_POST["naissmonth"], $_POST["naissday"], $_POST["naissyear"]);
|
||||
}
|
||||
|
||||
// Create new object
|
||||
if ($result > 0 && ! $error)
|
||||
if ($result > 0)
|
||||
{
|
||||
$object->oldcopy=dol_clone($object);
|
||||
|
||||
// Change values
|
||||
$object->civilite_id = trim($_POST["civilite_id"]);
|
||||
$object->firstname = trim($_POST["firstname"]);
|
||||
$object->lastname = trim($_POST["lastname"]);
|
||||
$object->prenom = trim($_POST["prenom"]); // deprecated
|
||||
$object->nom = trim($_POST["nom"]); // deprecated
|
||||
$object->firstname = trim($_POST["prenom"]);
|
||||
$object->lastname = trim($_POST["nom"]);
|
||||
$object->login = trim($_POST["login"]);
|
||||
$object->pass = trim($_POST["pass"]);
|
||||
|
||||
$object->societe = trim($_POST["societe"]);
|
||||
$object->adresse = trim($_POST["address"]); // deprecated
|
||||
$object->address = trim($_POST["address"]);
|
||||
$object->cp = trim($_POST["zipcode"]); // deprecated
|
||||
$object->zip = trim($_POST["zipcode"]);
|
||||
$object->ville = trim($_POST["town"]); // deprecated
|
||||
$object->town = trim($_POST["town"]);
|
||||
$object->state_id = $_POST["state_id"];
|
||||
$object->state_id = $_POST["departement_id"];
|
||||
$object->country_id = $_POST["country_id"];
|
||||
$object->fk_departement = $_POST["departement_id"]; // deprecated
|
||||
$object->pays_id = $_POST["country_id"]; // deprecated
|
||||
|
||||
$object->phone = trim($_POST["phone"]);
|
||||
$object->phone_perso = trim($_POST["phone_perso"]);
|
||||
$object->phone_mobile= trim($_POST["phone_mobile"]);
|
||||
$object->email = trim($_POST["email"]);
|
||||
$object->birth = $birthdate;
|
||||
$object->naiss = $datenaiss;
|
||||
|
||||
$object->typeid = $_POST["typeid"];
|
||||
//$object->note = trim($_POST["comment"]);
|
||||
@@ -298,8 +291,14 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
|
||||
$object->statut = $_POST["statut"];
|
||||
$object->public = $_POST["public"];
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
// Get extra fields
|
||||
foreach($_POST as $key => $value)
|
||||
{
|
||||
if (preg_match("/^options_/",$key))
|
||||
{
|
||||
$object->array_options[$key]=$_POST[$key];
|
||||
}
|
||||
}
|
||||
|
||||
// Check if we need to also synchronize user information
|
||||
$nosyncuser=0;
|
||||
@@ -366,23 +365,14 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
|
||||
{
|
||||
if ($object->oldcopy->del_to_abo() < 0)
|
||||
{
|
||||
if (! empty($object->oldcopy->error)) setEventMessage($langs->trans("ErrorFailedToRemoveToMailmanList").': '.$object->oldcopy->error, 'errors');
|
||||
setEventMessage($object->oldcopy->errors, 'errors');
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($object->oldcopy->mesgs,'mesgs');
|
||||
// error
|
||||
$errmsgs[]= $langs->trans("FailedToCleanMailmanList").': '.$object->error."<br>\n";
|
||||
}
|
||||
}
|
||||
// We add subscription if new email or new type (new type may means more mailing-list to subscribe)
|
||||
if ($object->add_to_abo() < 0)
|
||||
{
|
||||
if (! empty($object->error)) setEventMessage($langs->trans("ErrorFailedToAddToMailmanList").': '.$object->error, 'errors');
|
||||
setEventMessage($object->errors, 'errors');
|
||||
}
|
||||
else
|
||||
if ($object->add_to_abo() < 0) // We add subscription if new email or new type (new type may means more mailing-list to subscribe)
|
||||
{
|
||||
setEventMessage($object->mesgs, 'mesgs');
|
||||
// error
|
||||
$errmsgs[]= $langs->trans("FailedToAddToMailmanList").': '.$object->error."<br>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,21 +392,17 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$action='edit';
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'add' && $user->rights->adherent->creer)
|
||||
{
|
||||
if ($canvas) $object->canvas=$canvas;
|
||||
$birthdate='';
|
||||
if (isset($_POST["birthday"]) && $_POST["birthday"]
|
||||
&& isset($_POST["birthmonth"]) && $_POST["birthmonth"]
|
||||
&& isset($_POST["birthyear"]) && $_POST["birthyear"])
|
||||
$datenaiss='';
|
||||
if (isset($_POST["naissday"]) && $_POST["naissday"]
|
||||
&& isset($_POST["naissmonth"]) && $_POST["naissmonth"]
|
||||
&& isset($_POST["naissyear"]) && $_POST["naissyear"])
|
||||
{
|
||||
$birthdate=dol_mktime(12, 0, 0, $_POST["birthmonth"], $_POST["birthday"], $_POST["birthyear"]);
|
||||
$datenaiss=dol_mktime(12, 0, 0, $_POST["naissmonth"], $_POST["naissday"], $_POST["naissyear"]);
|
||||
}
|
||||
$datecotisation='';
|
||||
if (isset($_POST["reday"]) && isset($_POST["remonth"]) && isset($_POST["reyear"]))
|
||||
@@ -426,13 +412,13 @@ if ($action == 'add' && $user->rights->adherent->creer)
|
||||
|
||||
$typeid=$_POST["typeid"];
|
||||
$civilite_id=$_POST["civilite_id"];
|
||||
$lastname=$_POST["lastname"];
|
||||
$firstname=$_POST["firstname"];
|
||||
$nom=$_POST["nom"];
|
||||
$prenom=$_POST["prenom"];
|
||||
$societe=$_POST["societe"];
|
||||
$address=$_POST["address"];
|
||||
$zip=$_POST["zipcode"];
|
||||
$town=$_POST["town"];
|
||||
$state_id=$_POST["state_id"];
|
||||
$state_id=$_POST["departement_id"];
|
||||
$country_id=$_POST["country_id"];
|
||||
|
||||
$phone=$_POST["phone"];
|
||||
@@ -451,13 +437,20 @@ if ($action == 'add' && $user->rights->adherent->creer)
|
||||
$socid=$_POST["socid"];
|
||||
|
||||
$object->civilite_id = $civilite_id;
|
||||
$object->firstname = $firstname;
|
||||
$object->lastname = $lastname;
|
||||
$object->prenom = $prenom; // deprecated
|
||||
$object->nom = $nom; // deprecated
|
||||
$object->firstname = $prenom;
|
||||
$object->lastname = $nom;
|
||||
$object->societe = $societe;
|
||||
$object->adresse = $address; // deprecated
|
||||
$object->address = $address;
|
||||
$object->cp = $zip; // deprecated
|
||||
$object->zip = $zip;
|
||||
$object->ville = $town; // deprecated
|
||||
$object->town = $town;
|
||||
$object->fk_departement = $state_id;
|
||||
$object->state_id = $state_id;
|
||||
$object->pays_id = $country_id;
|
||||
$object->country_id = $country_id;
|
||||
$object->phone = $phone;
|
||||
$object->phone_perso = $phone_perso;
|
||||
@@ -465,7 +458,7 @@ if ($action == 'add' && $user->rights->adherent->creer)
|
||||
$object->email = $email;
|
||||
$object->login = $login;
|
||||
$object->pass = $pass;
|
||||
$object->naiss = $birthdate;
|
||||
$object->naiss = $datenaiss;
|
||||
$object->photo = $photo;
|
||||
$object->typeid = $typeid;
|
||||
//$object->note = $comment;
|
||||
@@ -474,8 +467,14 @@ if ($action == 'add' && $user->rights->adherent->creer)
|
||||
$object->fk_soc = $socid;
|
||||
$object->public = $public;
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
// Get extra fields
|
||||
foreach($_POST as $key => $value)
|
||||
{
|
||||
if (preg_match("/^options_/",$key))
|
||||
{
|
||||
$object->array_options[$key]=$_POST[$key];
|
||||
}
|
||||
}
|
||||
|
||||
// Check parameters
|
||||
if (empty($morphy) || $morphy == "-1") {
|
||||
@@ -506,12 +505,12 @@ if ($action == 'add' && $user->rights->adherent->creer)
|
||||
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Password"))."<br>\n";
|
||||
}
|
||||
}
|
||||
if ($morphy != 'mor' && empty($lastname)) {
|
||||
if (empty($nom)) {
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname"))."<br>\n";
|
||||
}
|
||||
if ($morphy != 'mor' && (!isset($firstname) || $firstname=='')) {
|
||||
if ($morphy != 'mor' && (!isset($prenom) || $prenom=='')) {
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname"))."<br>\n";
|
||||
@@ -701,6 +700,9 @@ if ($user->rights->adherent->creer && $action == 'confirm_add_spip' && $confirm
|
||||
$form = new Form($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('member');
|
||||
|
||||
$help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
|
||||
llxHeader('',$langs->trans("Member"),$help_url);
|
||||
|
||||
@@ -711,14 +713,13 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
// -----------------------------------------
|
||||
// When used with CANVAS
|
||||
// -----------------------------------------
|
||||
if (empty($object->error) && $rowid)
|
||||
if (empty($object->error) && $socid)
|
||||
{
|
||||
$object = new Adherent($db);
|
||||
$result=$object->fetch($rowid);
|
||||
if ($result <= 0) dol_print_error('',$object->error);
|
||||
$object->fetch($socid);
|
||||
}
|
||||
$objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates
|
||||
$objcanvas->display_canvas($action); // Show template
|
||||
$objcanvas->assign_values($action, $socid); // Set value for templates
|
||||
$objcanvas->display_canvas($action); // Show template
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -734,13 +735,15 @@ else
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
$object->canvas=$canvas;
|
||||
$object->state_id = GETPOST('departement_id', 'int');
|
||||
$object->fk_departement = GETPOST('departement_id', 'int');
|
||||
|
||||
// We set country_id, country_code and country for the selected country
|
||||
$object->country_id=GETPOST('country_id','int')?GETPOST('country_id','int'):$mysoc->country_id;
|
||||
if ($object->country_id)
|
||||
{
|
||||
$tmparray=getCountry($object->country_id,'all');
|
||||
$object->pays_code=$tmparray['code'];
|
||||
$object->pays=$tmparray['code'];
|
||||
$object->country_code=$tmparray['code'];
|
||||
$object->country=$tmparray['label'];
|
||||
}
|
||||
@@ -822,11 +825,11 @@ else
|
||||
print '</tr>';
|
||||
|
||||
// Lastname
|
||||
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" value="'.(GETPOST('lastname','alpha')?GETPOST('lastname','alpha'):$object->lastname).'" size="40"></td>';
|
||||
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="nom" value="'.(GETPOST('nom','alpha')?GETPOST('nom','alpha'):$object->lastname).'" size="40"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" size="40" value="'.(GETPOST('firstname','alpha')?GETPOST('firstname','alpha'):$object->firstname).'"></td>';
|
||||
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40" value="'.(GETPOST('prenom','alpha')?GETPOST('prenom','alpha'):$object->firstname).'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Password
|
||||
@@ -846,9 +849,9 @@ else
|
||||
|
||||
// Zip / Town
|
||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
|
||||
print $formcompany->select_ziptown((GETPOST('zipcode','alpha')?GETPOST('zipcode','alpha'):$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6);
|
||||
print $formcompany->select_ziptown((GETPOST('zipcode','alpha')?GETPOST('zipcode','alpha'):$object->zip),'zipcode',array('town','selectcountry_id','departement_id'),6);
|
||||
print ' ';
|
||||
print $formcompany->select_ziptown((GETPOST('town','alpha')?GETPOST('town','alpha'):$object->town),'town',array('zipcode','selectcountry_id','state_id'));
|
||||
print $formcompany->select_ziptown((GETPOST('town','alpha')?GETPOST('town','alpha'):$object->town),'town',array('zipcode','selectcountry_id','departement_id'));
|
||||
print '</td></tr>';
|
||||
|
||||
// Country
|
||||
@@ -864,7 +867,7 @@ else
|
||||
print '<tr><td>'.$langs->trans('State').'</td><td>';
|
||||
if ($object->country_id)
|
||||
{
|
||||
print $formcompany->select_state(GETPOST('state_id','int')?GETPOST('state_id','int'):$object->state_id,$object->country_code);
|
||||
print $formcompany->select_state(GETPOST('departement_id','int')?GETPOST('departement_id','int'):$object->fk_departement,$object->country_code);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -900,7 +903,15 @@ else
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?GETPOST('options_'.$key,'alpha'):(isset($object->array_options["options_".$key])?$object->array_options["options_".$key]:''));
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td>';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -914,7 +925,7 @@ else
|
||||
|
||||
// Login Dolibarr
|
||||
print '<tr><td>'.$langs->trans("LinkedToDolibarrUser").'</td><td class="valeur">';
|
||||
print $form->select_dolusers($object->user_id,'userid',1);
|
||||
print $form->select_users($object->user_id,'userid',1);
|
||||
print '</td></tr>';
|
||||
*/
|
||||
|
||||
@@ -947,8 +958,8 @@ else
|
||||
$adht = new AdherentType($db);
|
||||
$adht->fetch($object->typeid);
|
||||
|
||||
$country=GETPOST('pays','int');
|
||||
// We set country_id, and country_code, country of the chosen country
|
||||
$country=GETPOST('country','int');
|
||||
if (!empty($country) || $object->country_id)
|
||||
{
|
||||
$sql = "SELECT rowid, code, libelle as label from ".MAIN_DB_PREFIX."c_pays where rowid = ".(!empty($country)?$country:$object->country_id);
|
||||
@@ -961,6 +972,9 @@ else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
$object->pays_id=$obj->rowid;
|
||||
$object->pays_code=$obj->code;
|
||||
$object->pays=$langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->label;
|
||||
$object->country_id=$obj->rowid;
|
||||
$object->country_code=$obj->code;
|
||||
$object->country=$langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->label;
|
||||
@@ -1033,7 +1047,7 @@ else
|
||||
print $form->selectarray("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$object->morphy);
|
||||
print "</td>";
|
||||
// Photo
|
||||
print '<td align="center" class="hideonsmartphone" valign="middle" width="25%" rowspan="'.$rowspan.'">';
|
||||
print '<td align="center" valign="middle" width="25%" rowspan="'.$rowspan.'">';
|
||||
print $form->showphoto('memberphoto',$object)."\n";
|
||||
if ($caneditfieldmember)
|
||||
{
|
||||
@@ -1068,12 +1082,12 @@ else
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Lastname
|
||||
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" size="40" value="'.(isset($_POST["lastname"])?$_POST["lastname"]:$object->lastname).'"></td>';
|
||||
// Name
|
||||
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="nom" size="40" value="'.(isset($_POST["nom"])?$_POST["nom"]:$object->lastname).'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" size="40" value="'.(isset($_POST["firstname"])?$_POST["firstname"]:$object->firstname).'"></td>';
|
||||
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40" value="'.(isset($_POST["prenom"])?$_POST["prenom"]:$object->firstname).'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Password
|
||||
@@ -1089,9 +1103,9 @@ else
|
||||
|
||||
// Zip / Town
|
||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
|
||||
print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6);
|
||||
print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectcountry_id','departement_id'),6);
|
||||
print ' ';
|
||||
print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectcountry_id','state_id'));
|
||||
print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectcountry_id','departement_id'));
|
||||
print '</td></tr>';
|
||||
|
||||
// Country
|
||||
@@ -1105,7 +1119,7 @@ else
|
||||
if (empty($conf->global->MEMBER_DISABLE_STATE))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('State').'</td><td>';
|
||||
print $formcompany->select_state($object->state_id,isset($_POST["country_id"])?$_POST["country_id"]:$object->country_id);
|
||||
print $formcompany->select_state($object->fk_departement,isset($_POST["country_id"])?$_POST["country_id"]:$object->country_id);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@@ -1121,9 +1135,9 @@ else
|
||||
// EMail
|
||||
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED?'<span class="fieldrequired">':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'</span>':'').'</td><td><input type="text" name="email" size="40" value="'.(isset($_POST["email"])?$_POST["email"]:$object->email).'"></td></tr>';
|
||||
|
||||
// Birthday
|
||||
// Date naissance
|
||||
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
||||
$form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
|
||||
$form->select_date(($object->naiss ? $object->naiss : -1),'naiss','','',1,'formsoc');
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Profil public
|
||||
@@ -1136,7 +1150,15 @@ else
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td>';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
// Third party Dolibarr
|
||||
@@ -1374,7 +1396,7 @@ else
|
||||
print $form->showrefnav($object, 'rowid', $linkback);
|
||||
print '</td></tr>';
|
||||
|
||||
$showphoto='<td rowspan="'.$rowspan.'" align="center" class="hideonsmartphone" valign="middle" width="25%">';
|
||||
$showphoto='<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
|
||||
$showphoto.=$form->showphoto('memberphoto',$object);
|
||||
$showphoto.='</td>';
|
||||
|
||||
@@ -1382,7 +1404,6 @@ else
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td>';
|
||||
// Photo
|
||||
print $showphoto; $showphoto='';
|
||||
print '</tr>';
|
||||
}
|
||||
@@ -1421,7 +1442,7 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Zip / Town
|
||||
print '<tr><td class="nowrap">'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td class="valeur">'.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town.'</td></tr>';
|
||||
print '<tr><td nowrap="nowrap">'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td class="valeur">'.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town.'</td></tr>';
|
||||
|
||||
// Country
|
||||
print '<tr><td>'.$langs->trans("Country").'</td><td class="valeur">';
|
||||
@@ -1431,7 +1452,7 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// State
|
||||
print '<tr><td>'.$langs->trans('State').'</td><td class="valeur">'.$object->state.'</td>';
|
||||
print '<tr><td>'.$langs->trans('State').'</td><td class="valeur">'.$object->departement.'</td>';
|
||||
|
||||
// Tel pro.
|
||||
print '<tr><td>'.$langs->trans("PhonePro").'</td><td class="valeur">'.dol_print_phone($object->phone,$object->country_code,0,$object->fk_soc,1).'</td></tr>';
|
||||
@@ -1445,8 +1466,8 @@ else
|
||||
// EMail
|
||||
print '<tr><td>'.$langs->trans("EMail").'</td><td class="valeur">'.dol_print_email($object->email,0,$object->fk_soc,1).'</td></tr>';
|
||||
|
||||
// Birthday
|
||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||
// Date naissance
|
||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->naiss,'day').'</td></tr>';
|
||||
|
||||
// Public
|
||||
print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';
|
||||
@@ -1459,7 +1480,13 @@ else
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
print $object->showOptionals($extrafields);
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=$object->array_options["options_$key"];
|
||||
print "<tr><td>".$label."</td><td>";
|
||||
print $extrafields->showOutputField($key,$value);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
}
|
||||
|
||||
// Third party Dolibarr
|
||||
@@ -1548,11 +1575,11 @@ else
|
||||
// Modify
|
||||
if ($user->rights->adherent->creer)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="fiche.php?rowid='.$rowid.'&action=edit">'.$langs->trans("Modify")."</a></div>";
|
||||
print "<a class=\"butAction\" href=\"fiche.php?rowid=$rowid&action=edit\">".$langs->trans("Modify")."</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="inline-block divButAction"><font class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Modify").'</font></div>';
|
||||
print "<font class=\"butActionRefused\" href=\"#\" title=\"".dol_escape_htmltag($langs->trans("NotEnoughPermissions"))."\">".$langs->trans("Modify")."</font>";
|
||||
}
|
||||
|
||||
// Valider
|
||||
@@ -1560,11 +1587,11 @@ else
|
||||
{
|
||||
if ($user->rights->adherent->creer)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="fiche.php?rowid='.$rowid.'&action=valid">'.$langs->trans("Validate")."</a></div>\n";
|
||||
print "<a class=\"butAction\" href=\"fiche.php?rowid=$rowid&action=valid\">".$langs->trans("Validate")."</a>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="inline-block divButAction"><font class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Validate").'</font></div>';
|
||||
print "<font class=\"butActionRefused\" href=\"#\" title=\"".dol_escape_htmltag($langs->trans("NotEnoughPermissions"))."\">".$langs->trans("Validate")."</font>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1573,11 +1600,11 @@ else
|
||||
{
|
||||
if ($user->rights->adherent->creer)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="fiche.php?rowid='.$rowid.'&action=valid">'.$langs->trans("Reenable")."</a></div>\n";
|
||||
print "<a class=\"butAction\" href=\"fiche.php?rowid=$rowid&action=valid\">".$langs->trans("Reenable")."</a>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="inline-block divButAction"><font class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Reenable")."</font></div>";
|
||||
print "<font class=\"butActionRefused\" href=\"#\" title=\"".dol_escape_htmltag($langs->trans("NotEnoughPermissions"))."\">".$langs->trans("Reenable")."</font>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1586,17 +1613,17 @@ else
|
||||
{
|
||||
if ($object->statut >= 1)
|
||||
{
|
||||
if ($object->email) print '<div class="inline-block divButAction"><a class="butAction" href="fiche.php?rowid='.$object->id.'&action=sendinfo">'.$langs->trans("SendCardByMail")."</a></div>\n";
|
||||
else print '<div class="inline-block divButAction"><a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NoEMail")).'">'.$langs->trans("SendCardByMail")."</a></div>\n";
|
||||
if ($object->email) print "<a class=\"butAction\" href=\"fiche.php?rowid=$object->id&action=sendinfo\">".$langs->trans("SendCardByMail")."</a>\n";
|
||||
else print "<a class=\"butActionRefused\" href=\"#\" title=\"".dol_escape_htmltag($langs->trans("NoEMail"))."\">".$langs->trans("SendCardByMail")."</a>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="inline-block divButAction"><font class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("SendCardByMail")."</font></div>";
|
||||
print "<font class=\"butActionRefused\" href=\"#\" title=\"".dol_escape_htmltag($langs->trans("ValidateBefore"))."\">".$langs->trans("SendCardByMail")."</font>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="inline-block divButAction"><font class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("SendCardByMail")."</font></div>";
|
||||
print "<font class=\"butActionRefused\" href=\"#\" title=\"".dol_escape_htmltag($langs->trans("NotEnoughPermissions"))."\">".$langs->trans("SendCardByMail")."</font>";
|
||||
}
|
||||
|
||||
// Resilier
|
||||
@@ -1604,11 +1631,11 @@ else
|
||||
{
|
||||
if ($user->rights->adherent->supprimer)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="fiche.php?rowid='.$rowid.'&action=resign">'.$langs->trans("Resiliate")."</a></div>\n";
|
||||
print "<a class=\"butAction\" href=\"fiche.php?rowid=$rowid&action=resign\">".$langs->trans("Resiliate")."</a>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="inline-block divButAction"><font class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Resiliate")."</font></div>";
|
||||
print "<font class=\"butActionRefused\" href=\"#\" title=\"".dol_escape_htmltag($langs->trans("NotEnoughPermissions"))."\">".$langs->trans("Resiliate")."</font>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1617,12 +1644,12 @@ else
|
||||
{
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
if ($object->statut != -1) print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$object->id.'&action=create_thirdparty">'.$langs->trans("CreateDolibarrThirdParty").'</a></div>';
|
||||
else print '<div class="inline-block divButAction"><a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("CreateDolibarrThirdParty").'</a></div>';
|
||||
if ($object->statut != -1) print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$object->id.'&action=create_thirdparty">'.$langs->trans("CreateDolibarrThirdParty").'</a>';
|
||||
else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("CreateDolibarrThirdParty").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="inline-block divButAction"><font class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("CreateDolibarrThirdParty")."</font></div>";
|
||||
print "<font class=\"butActionRefused\" href=\"#\" title=\"".dol_escape_htmltag($langs->trans("NotEnoughPermissions"))."\">".$langs->trans("CreateDolibarrThirdParty")."</font>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1631,23 +1658,23 @@ else
|
||||
{
|
||||
if ($user->rights->user->user->creer)
|
||||
{
|
||||
if ($object->statut != -1) print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$object->id.'&action=create_user">'.$langs->trans("CreateDolibarrLogin").'</a></div>';
|
||||
else print '<div class="inline-block divButAction"><a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("CreateDolibarrLogin").'</a></div>';
|
||||
if ($object->statut != -1) print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$object->id.'&action=create_user">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
||||
else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="inline-block divButAction"><font class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("CreateDolibarrLogin")."</font></div>";
|
||||
print "<font class=\"butActionRefused\" href=\"#\" title=\"".dol_escape_htmltag($langs->trans("NotEnoughPermissions"))."\">".$langs->trans("CreateDolibarrLogin")."</font>";
|
||||
}
|
||||
}
|
||||
|
||||
// Delete
|
||||
if ($user->rights->adherent->supprimer)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="fiche.php?rowid='.$object->id.'&action=delete">'.$langs->trans("Delete")."</a></div>\n";
|
||||
print "<a class=\"butActionDelete\" href=\"fiche.php?rowid=$object->id&action=delete\">".$langs->trans("Delete")."</a>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="inline-block divButAction"><font class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Delete")."</font></div>";
|
||||
print "<font class=\"butActionRefused\" href=\"#\" title=\"".dol_escape_htmltag($langs->trans("NotEnoughPermissions"))."\">".$langs->trans("Delete")."</font>";
|
||||
}
|
||||
|
||||
// Action SPIP
|
||||
@@ -1657,22 +1684,21 @@ else
|
||||
|
||||
if ($isinspip == 1)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="fiche.php?rowid='.$object->id.'&action=del_spip">'.$langs->trans("DeleteIntoSpip")."</a></div>\n";
|
||||
print "<a class=\"butAction\" href=\"fiche.php?rowid=$object->id&action=del_spip\">".$langs->trans("DeleteIntoSpip")."</a>\n";
|
||||
}
|
||||
if ($isinspip == 0)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="fiche.php?rowid='.$object->id.'&action=add_spip">'.$langs->trans("AddIntoSpip")."</a></div>\n";
|
||||
print "<a class=\"butAction\" href=\"fiche.php?rowid=$object->id&action=add_spip\">".$langs->trans("AddIntoSpip")."</a>\n";
|
||||
}
|
||||
if ($isinspip == -1)
|
||||
{
|
||||
print '<br><br><font class="error">'.$langs->trans('SPIPConnectionFailed').': '.$mailmanspip->error.'</font>';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
if ($isinspip == -1)
|
||||
{
|
||||
print '<br><br><font class="error">'.$langs->trans('SPIPConnectionFailed').': '.$mailmanspip->error.'</font>';
|
||||
}
|
||||
print "<br>\n";
|
||||
|
||||
}
|
||||
|
||||
@@ -371,18 +371,18 @@ if ($rowid && $action != 'edit')
|
||||
{
|
||||
if (! $bankline->rappro)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"]."?rowid=".$subscription->id."&action=edit\">".$langs->trans("Modify")."</a></div>";
|
||||
print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?rowid=".$subscription->id."&action=edit\">".$langs->trans("Modify")."</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butActionRefused" title="'.$langs->trans("BankLineConciliated")."\" href=\"#\">".$langs->trans("Modify")."</a></div>";
|
||||
print "<a class=\"butActionRefused\" title=\"".$langs->trans("BankLineConciliated")."\" href=\"#\">".$langs->trans("Modify")."</a>";
|
||||
}
|
||||
}
|
||||
|
||||
// Supprimer
|
||||
if ($user->rights->adherent->cotisation->creer)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"]."?rowid=".$subscription->id."&action=delete\">".$langs->trans("Delete")."</a></div>\n";
|
||||
print "<a class=\"butActionDelete\" href=\"".$_SERVER["PHP_SELF"]."?rowid=".$subscription->id."&action=delete\">".$langs->trans("Delete")."</a>\n";
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
@@ -27,13 +27,12 @@
|
||||
require '../main.inc.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/cotisation.class.php';
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("members");
|
||||
|
||||
// Security check
|
||||
$result=restrictedArea($user,'adherent');
|
||||
// Security check
|
||||
$result=restrictedArea($user,'adherent');
|
||||
|
||||
|
||||
/*
|
||||
@@ -48,6 +47,7 @@ $subscriptionstatic=new Cotisation($db);
|
||||
|
||||
print_fiche_titre($langs->trans("MembersArea"));
|
||||
|
||||
print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||
|
||||
$var=True;
|
||||
|
||||
@@ -122,8 +122,7 @@ if ($result)
|
||||
}
|
||||
|
||||
|
||||
//print '<tr><td width="30%" class="notopnoleft" valign="top">';
|
||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
print '<tr><td width="30%" class="notopnoleft" valign="top">';
|
||||
|
||||
|
||||
// Formulaire recherche adherent
|
||||
@@ -141,7 +140,7 @@ print $langs->trans("Ref").':</td><td><input type="text" name="search_ref" class
|
||||
print '</td><td rowspan="3"><input class="button" type="submit" value="'.$langs->trans("Search").'"></td></tr>';
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td>';
|
||||
print $langs->trans("Name").':</td><td><input type="text" name="search_lastname" class="flat" size="16">';
|
||||
print $langs->trans("Name").':</td><td><input type="text" name="search_nom" class="flat" size="16">';
|
||||
print '</td></tr>';
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td>';
|
||||
@@ -196,9 +195,7 @@ if ($conf->use_javascript_ajax)
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
|
||||
//print '</td><td class="notopnoleftnoright" valign="top">';
|
||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
print '</td><td class="notopnoleftnoright" valign="top">';
|
||||
|
||||
|
||||
$var=true;
|
||||
@@ -208,7 +205,7 @@ $var=true;
|
||||
*/
|
||||
$max=5;
|
||||
|
||||
$sql = "SELECT a.rowid, a.statut, a.lastname, a.firstname, a.societe as company, a.fk_soc,";
|
||||
$sql = "SELECT a.rowid, a.statut, a.nom as lastname, a.prenom as firstname, a.societe as company, a.fk_soc,";
|
||||
$sql.= " a.tms as datem, datefin as date_end_subscription,";
|
||||
$sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
|
||||
@@ -268,7 +265,7 @@ else
|
||||
*/
|
||||
$max=5;
|
||||
|
||||
$sql = "SELECT a.rowid, a.statut, a.lastname, a.firstname, a.societe as company, a.fk_soc,";
|
||||
$sql = "SELECT a.rowid, a.statut, a.nom as lastname, a.prenom as firstname, a.societe as company, a.fk_soc,";
|
||||
$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.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."cotisation as c";
|
||||
@@ -419,8 +416,8 @@ print "<td align=\"right\">".price(price2num($numb>0?($tot/$numb):0,'MT'))."</td
|
||||
print "</tr>\n";
|
||||
print "</table><br>\n";
|
||||
|
||||
//print '</td></tr></table>';
|
||||
print '</div></div></div>';
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@@ -108,11 +108,11 @@ print '<td class="valeur">';
|
||||
print $form->showrefnav($adh,'id');
|
||||
print '</td></tr>';
|
||||
|
||||
// Lastname
|
||||
// Nom
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$adh->lastname.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
// Prenom
|
||||
print '<tr><td width="15%">'.$langs->trans("Firstname").'</td><td class="valeur">'.$adh->firstname.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
@@ -169,7 +169,7 @@ print '<div class="tabsAction">';
|
||||
|
||||
if (! empty($conf->global->LDAP_MEMBER_ACTIVE) && $conf->global->LDAP_MEMBER_ACTIVE != 'ldap2dolibarr')
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$adh->id.'&action=dolibarr2ldap">'.$langs->trans("ForceSynchronize").'</a></div>';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$adh->id.'&action=dolibarr2ldap">'.$langs->trans("ForceSynchronize").'</a>';
|
||||
}
|
||||
|
||||
print "</div>\n";
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2013 Raphaël Doursenaud <rdoursenaud@gpcsolutions.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
|
||||
@@ -32,16 +31,16 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||
$langs->load("members");
|
||||
$langs->load("companies");
|
||||
|
||||
// Security check
|
||||
$result=restrictedArea($user,'adherent');
|
||||
// Security check
|
||||
$result=restrictedArea($user,'adherent');
|
||||
|
||||
$action=GETPOST("action");
|
||||
$filter=GETPOST("filter");
|
||||
$statut=GETPOST("statut");
|
||||
$search=GETPOST("search");
|
||||
$search_ref=GETPOST("search_ref");
|
||||
$search_lastname=GETPOST("search_lastname");
|
||||
$search_firstname=GETPOST("search_firstname");
|
||||
$search_nom=GETPOST("search_nom");
|
||||
$search_prenom=GETPOST("search_prenom");
|
||||
$search_login=GETPOST("search_login");
|
||||
$type=GETPOST("type");
|
||||
$search_email=GETPOST("search_email");
|
||||
@@ -57,14 +56,14 @@ $offset = $conf->liste_limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (! $sortorder) { $sortorder=($filter=='outofdate'?"ASC":"DESC"); }
|
||||
if (! $sortfield) { $sortfield=($filter=='outofdate'?"d.datefin":"d.lastname"); }
|
||||
if (! $sortfield) { $sortfield=($filter=='outofdate'?"d.datefin":"d.nom"); }
|
||||
|
||||
if (GETPOST("button_removefilter"))
|
||||
{
|
||||
$search="";
|
||||
$search_ref="";
|
||||
$search_lastname="";
|
||||
$search_firstname="";
|
||||
$search_nom="";
|
||||
$search_prenom="";
|
||||
$search_login="";
|
||||
$type="";
|
||||
$search_email="";
|
||||
@@ -87,7 +86,7 @@ llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhé
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
$sql = "SELECT d.rowid, d.login, d.lastname, d.firstname, d.societe as company, d.fk_soc,";
|
||||
$sql = "SELECT d.rowid, d.login, d.nom as lastname, d.prenom as firstname, d.societe as company, d.fk_soc,";
|
||||
$sql.= " d.datefin,";
|
||||
$sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
|
||||
$sql.= " t.libelle as type, t.cotisation";
|
||||
@@ -102,15 +101,11 @@ if ($search_categ == -2) $sql.= " AND cm.fk_categorie IS NULL";
|
||||
$sql.= " AND d.entity = ".$conf->entity;
|
||||
if ($sall)
|
||||
{
|
||||
// For natural search
|
||||
$scrit = explode(' ', $sall);
|
||||
foreach ($scrit as $crit) {
|
||||
$sql.=" AND (";
|
||||
if (is_numeric($sall)) $sql.= "d.rowid = ".$sall." OR ";
|
||||
$sql.=" d.firstname LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'";
|
||||
$sql.=" OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'";
|
||||
$sql.=" OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')";
|
||||
}
|
||||
$sql.=" AND (";
|
||||
if (is_numeric($sall)) $sql.= "d.rowid = ".$sall." OR ";
|
||||
$sql.=" d.prenom LIKE '%".$sall."%' OR d.nom LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'";
|
||||
$sql.=" OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.adresse LIKE '%".$sall."%'";
|
||||
$sql.=" OR d.ville LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')";
|
||||
}
|
||||
if ($type > 0)
|
||||
{
|
||||
@@ -125,9 +120,9 @@ if ($search_ref)
|
||||
if (is_numeric($search_ref)) $sql.= " AND (d.rowid = ".$search_ref.")";
|
||||
else $sql.=" AND 1 = 2"; // Always wrong
|
||||
}
|
||||
if ($search_lastname)
|
||||
if ($search_nom)
|
||||
{
|
||||
$sql.= " AND (d.firstname LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')";
|
||||
$sql.= " AND (d.prenom LIKE '%".$search_nom."%' OR d.nom LIKE '%".$search_nom."%')";
|
||||
}
|
||||
if ($search_login)
|
||||
{
|
||||
@@ -221,7 +216,7 @@ if ($resql)
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.lastname",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.nom",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Login"),$_SERVER["PHP_SELF"],"d.login",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"t.libelle",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Person"),$_SERVER["PHP_SELF"],"d.morphy",$param,"","",$sortfield,$sortorder);
|
||||
@@ -238,7 +233,7 @@ if ($resql)
|
||||
print '<input class="flat" type="text" name="search_ref" value="'.$search_ref.'" size="4"></td>';
|
||||
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" name="search_lastname" value="'.$search_lastname.'" size="12"></td>';
|
||||
print '<input class="flat" type="text" name="search_nom" value="'.$search_nom.'" size="12"></td>';
|
||||
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" name="search_login" value="'.$search_login.'" size="7"></td>';
|
||||
@@ -304,7 +299,7 @@ if ($resql)
|
||||
// Type
|
||||
$membertypestatic->id=$objp->type_id;
|
||||
$membertypestatic->libelle=$objp->type;
|
||||
print '<td class="nowrap">';
|
||||
print '<td nowrap="nowrap">';
|
||||
print $membertypestatic->getNomUrl(1,32);
|
||||
print '</td>';
|
||||
|
||||
@@ -315,21 +310,21 @@ if ($resql)
|
||||
print "<td>".dol_print_email($objp->email,0,0,1)."</td>\n";
|
||||
|
||||
// Statut
|
||||
print '<td class="nowrap">';
|
||||
print '<td nowrap="nowrap">';
|
||||
print $memberstatic->LibStatut($objp->statut,$objp->cotisation,$datefin,2);
|
||||
print "</td>";
|
||||
|
||||
// End of subscription date
|
||||
if ($datefin)
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td align="center" nowrap="nowrap">';
|
||||
print dol_print_date($datefin,'day');
|
||||
if ($datefin < ($now - $conf->adherent->cotisation->warning_delay) && $objp->statut > 0) print " ".img_warning($langs->trans("SubscriptionLate"));
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="left" class="nowrap">';
|
||||
print '<td align="left" nowrap="nowrap">';
|
||||
if ($objp->cotisation == 'yes')
|
||||
{
|
||||
print $langs->trans("SubscriptionNotReceived");
|
||||
|
||||
@@ -54,7 +54,7 @@ if ($action == 'update' && $user->rights->adherent->creer && ! $_POST["cancel"])
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
$res=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
||||
$res=$object->update_note($_POST["note"],$user);
|
||||
if ($res < 0)
|
||||
{
|
||||
setEventMessage($object->error, 'errors');
|
||||
@@ -167,7 +167,7 @@ if ($id)
|
||||
|
||||
if ($user->rights->adherent->creer && $action != 'edit')
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="note.php?id='.$object->id.'&action=edit">'.$langs->trans('Modify')."</a></div>";
|
||||
print "<a class=\"butAction\" href=\"note.php?id=".$object->id."&action=edit\">".$langs->trans('Modify')."</a>";
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
|
||||
@@ -44,8 +44,6 @@ $year = strftime("%Y", time());
|
||||
$startyear=$year-2;
|
||||
$endyear=$year;
|
||||
|
||||
$langs->load("members");
|
||||
$langs->load("companies");
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -23,9 +23,8 @@
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||
|
||||
$graphwidth=DolGraph::getDefaultGraphSizeForStats('width',700);
|
||||
$graphwidth = 700;
|
||||
$mapratio = 0.5;
|
||||
$graphheight = round($graphwidth * $mapratio);
|
||||
|
||||
@@ -38,23 +37,20 @@ if ($user->societe_id > 0)
|
||||
$action = '';
|
||||
$socid = $user->societe_id;
|
||||
}
|
||||
$result=restrictedArea($user,'adherent','','','cotisation');
|
||||
$result=restrictedArea($user,'adherent','','','cotisation');
|
||||
|
||||
$year = strftime("%Y", time());
|
||||
$startyear=$year-2;
|
||||
$endyear=$year;
|
||||
|
||||
$langs->load("members");
|
||||
$langs->load("companies");
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$arrayjs=array('http://www.google.com/jsapi');
|
||||
if (! empty($conf->dol_use_jmobile)) $arrayjs=array();
|
||||
llxHeader('','','','',0,0,$arrayjs);
|
||||
|
||||
llxHeader('','','','',0,0,array('http://www.google.com/jsapi'));
|
||||
|
||||
$title=$langs->trans("Statistics");
|
||||
if ($mode == 'memberbycountry') $title=$langs->trans("MembersStatisticsByCountries");
|
||||
@@ -75,7 +71,7 @@ if ($mode)
|
||||
|
||||
$data = array();
|
||||
$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.country = 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.entity IN (".getEntity().")";
|
||||
$sql.=" AND d.statut = 1";
|
||||
$sql.=" GROUP BY c.libelle, c.code";
|
||||
@@ -89,9 +85,9 @@ if ($mode)
|
||||
|
||||
$data = array();
|
||||
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, p.code, p.libelle as label, c.nom as label2";
|
||||
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c on d.state_id = 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_pays as p on d.country = p.rowid";
|
||||
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid";
|
||||
$sql.=" WHERE d.entity IN (".getEntity().")";
|
||||
$sql.=" AND d.statut = 1";
|
||||
$sql.=" GROUP BY p.libelle, p.code, c.nom";
|
||||
@@ -104,12 +100,12 @@ if ($mode)
|
||||
$tab='statstown';
|
||||
|
||||
$data = array();
|
||||
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, p.code, p.libelle as label, d.town 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.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.country = p.rowid";
|
||||
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid";
|
||||
$sql.=" WHERE d.entity IN (".getEntity().")";
|
||||
$sql.=" AND d.statut = 1";
|
||||
$sql.=" GROUP BY p.libelle, p.code, d.town";
|
||||
$sql.=" GROUP BY p.libelle, p.code, d.ville";
|
||||
//print $sql;
|
||||
}
|
||||
|
||||
@@ -198,7 +194,7 @@ else
|
||||
|
||||
|
||||
// Show graphics
|
||||
if (count($arrayjs) && $mode == 'memberbycountry')
|
||||
if ($mode == 'memberbycountry')
|
||||
{
|
||||
$color_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/graph-color.php';
|
||||
if (is_readable($color_file)) include_once $color_file;
|
||||
|
||||
@@ -28,8 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherentstats.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||
|
||||
$WIDTH=DolGraph::getDefaultGraphSizeForStats('width');
|
||||
$HEIGHT=DolGraph::getDefaultGraphSizeForStats('height');
|
||||
$WIDTH=500;
|
||||
$HEIGHT=200;
|
||||
|
||||
$userid=GETPOST('userid','int'); if ($userid < 0) $userid=0;
|
||||
$socid=GETPOST('socid','int'); if ($socid < 0) $socid=0;
|
||||
@@ -46,9 +46,6 @@ $year = strftime("%Y", time());
|
||||
$startyear=$year-2;
|
||||
$endyear=$year;
|
||||
|
||||
$langs->load("members");
|
||||
$langs->load("companies");
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
@@ -56,6 +53,8 @@ $langs->load("companies");
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$langs->load("propal");
|
||||
|
||||
llxHeader();
|
||||
|
||||
print_fiche_titre($langs->trans("SubscriptionsStatistics"), $mesg);
|
||||
@@ -144,7 +143,8 @@ $head = member_stats_prepare_head($adh);
|
||||
dol_fiche_head($head, 'statssubscription', $langs->trans("Statistics"), 0, 'user');
|
||||
|
||||
|
||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
print '<table class="notopnoleftnopadd" width="100%"><tr>';
|
||||
print '<td align="center" valign="top">';
|
||||
|
||||
// Show filter box
|
||||
/*print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
@@ -155,7 +155,7 @@ $filter='s.client in (1,2,3)';
|
||||
print $form->select_company($id,'memberid',$filter,1);
|
||||
print '</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("User").'</td><td>';
|
||||
print $form->select_dolusers($userid,'userid',1);
|
||||
print $form->select_users($userid,'userid',1);
|
||||
print '</td></tr>';
|
||||
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
|
||||
print '</table>';
|
||||
@@ -210,8 +210,8 @@ foreach ($data as $val)
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
|
||||
print '</td>';
|
||||
print '<td align="center" valign="top">';
|
||||
|
||||
// Show graphs
|
||||
print '<table class="border" width="100%"><tr valign="top"><td align="center">';
|
||||
@@ -223,10 +223,7 @@ else {
|
||||
}
|
||||
print '</td></tr></table>';
|
||||
|
||||
|
||||
print '</div></div></div>';
|
||||
print '<div style="clear:both"></div>';
|
||||
|
||||
print '</td></tr></table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* 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
|
||||
@@ -28,14 +27,13 @@
|
||||
require '../main.inc.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.'/core/class/extrafields.class.php';
|
||||
|
||||
$langs->load("members");
|
||||
|
||||
$rowid = GETPOST('rowid','int');
|
||||
$action = GETPOST('action','alpha');
|
||||
|
||||
$search_lastname = GETPOST('search_lastname','alpha');
|
||||
$search_lastname = GETPOST('search_nom','alpha');
|
||||
$search_login = GETPOST('search_login','alpha');
|
||||
$search_email = GETPOST('search_email','alpha');
|
||||
$type = GETPOST('type','alpha');
|
||||
@@ -49,16 +47,11 @@ $offset = $conf->liste_limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (! $sortorder) { $sortorder="DESC"; }
|
||||
if (! $sortfield) { $sortfield="d.lastname"; }
|
||||
if (! $sortfield) { $sortfield="d.nom"; }
|
||||
|
||||
// Security check
|
||||
$result=restrictedArea($user,'adherent',$rowid,'adherent_type');
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('adherent_type');
|
||||
|
||||
if (GETPOST('button_removefilter'))
|
||||
{
|
||||
$search_lastname="";
|
||||
@@ -69,8 +62,6 @@ if (GETPOST('button_removefilter'))
|
||||
}
|
||||
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('membertypecard'));
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@@ -87,9 +78,6 @@ if ($action == 'add' && $user->rights->adherent->configurer)
|
||||
$adht->mail_valid = trim($_POST["mail_valid"]);
|
||||
$adht->vote = trim($_POST["vote"]);
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$adht);
|
||||
|
||||
if ($adht->libelle)
|
||||
{
|
||||
$id=$adht->create($user->id);
|
||||
@@ -124,9 +112,6 @@ if ($action == 'update' && $user->rights->adherent->configurer)
|
||||
$adht->mail_valid = trim($_POST["mail_valid"]);
|
||||
$adht->vote = trim($_POST["vote"]);
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$adht);
|
||||
|
||||
$adht->update($user->id);
|
||||
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?rowid=".$_POST["rowid"]);
|
||||
@@ -146,7 +131,7 @@ if ($action == 'commentaire' && $user->rights->adherent->configurer)
|
||||
{
|
||||
$don = new Don($db);
|
||||
$don->fetch($rowid);
|
||||
$don->update_note(dol_html_entity_decode(GETPOST('commentaire'), ENT_QUOTES));
|
||||
$don->update_note($_POST["commentaire"]);
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +203,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
||||
// New type
|
||||
if ($user->rights->adherent->configurer)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=create">'.$langs->trans("NewType").'</a></div>';
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=create">'.$langs->trans("NewType").'</a>';
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
@@ -234,7 +219,6 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
||||
if ($action == 'create')
|
||||
{
|
||||
$form = new Form($db);
|
||||
$adht = new AdherentType($db);
|
||||
|
||||
print_fiche_titre($langs->trans("NewMemberType"));
|
||||
|
||||
@@ -265,13 +249,6 @@ if ($action == 'create')
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
// Other attributes
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
print $adht->showOptionals($extrafields,'edit');
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
print '<br>';
|
||||
@@ -292,7 +269,6 @@ if ($rowid > 0)
|
||||
{
|
||||
$adht = new AdherentType($db);
|
||||
$adht->fetch($rowid);
|
||||
$adht->fetch_optionals($rowid,$extralabels);
|
||||
|
||||
$h=0;
|
||||
|
||||
@@ -331,16 +307,8 @@ if ($rowid > 0)
|
||||
print '<tr><td valign="top">'.$langs->trans("WelcomeEMail").'</td><td>';
|
||||
print nl2br($adht->mail_valid)."</td></tr>";
|
||||
|
||||
// Other attributes
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
// View extrafields
|
||||
print $adht->showOptionals($extrafields);
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
/*
|
||||
@@ -352,16 +320,16 @@ if ($rowid > 0)
|
||||
// Edit
|
||||
if ($user->rights->adherent->configurer)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=edit&rowid='.$adht->id.'">'.$langs->trans("Modify").'</a></div>';
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=edit&rowid='.$adht->id.'">'.$langs->trans("Modify").'</a>';
|
||||
}
|
||||
|
||||
// Add
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="fiche.php?action=create&typeid='.$adht->id.'">'.$langs->trans("AddMember").'</a></div>';
|
||||
print '<a class="butAction" href="fiche.php?action=create&typeid='.$adht->id.'">'.$langs->trans("AddMember").'</a>';
|
||||
|
||||
// Delete
|
||||
if ($user->rights->adherent->configurer)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=delete&rowid='.$adht->id.'">'.$langs->trans("DeleteType").'</a></div>';
|
||||
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=delete&rowid='.$adht->id.'">'.$langs->trans("DeleteType").'</a>';
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
@@ -370,10 +338,10 @@ if ($rowid > 0)
|
||||
// Show list of members (nearly same code than in page liste.php)
|
||||
|
||||
$membertypestatic=new AdherentType($db);
|
||||
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, ";
|
||||
$sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.nom as lastname, d.societe, ";
|
||||
$sql.= " d.datefin,";
|
||||
$sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
|
||||
$sql.= " t.libelle as type, t.cotisation";
|
||||
@@ -383,9 +351,9 @@ if ($rowid > 0)
|
||||
$sql.= " AND t.rowid = ".$adht->id;
|
||||
if ($sall)
|
||||
{
|
||||
$sql.= " AND (d.firstname LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'";
|
||||
$sql.= " OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'";
|
||||
$sql.= " OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')";
|
||||
$sql.= " AND (d.prenom LIKE '%".$sall."%' OR d.nom LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'";
|
||||
$sql.= " OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.adresse LIKE '%".$sall."%'";
|
||||
$sql.= " OR d.ville LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')";
|
||||
}
|
||||
if ($status != '')
|
||||
{
|
||||
@@ -395,12 +363,12 @@ if ($rowid > 0)
|
||||
{
|
||||
if (isset($_POST['search']) && $_POST['search'] != '')
|
||||
{
|
||||
$sql.= " AND (d.firstname LIKE '%".$_POST['search']."%' OR d.lastname LIKE '%".$_POST['search']."%')";
|
||||
$sql.= " AND (d.prenom LIKE '%".$_POST['search']."%' OR d.nom LIKE '%".$_POST['search']."%')";
|
||||
}
|
||||
}
|
||||
if (! empty($search_lastname))
|
||||
{
|
||||
$sql.= " AND (d.firstname LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')";
|
||||
$sql.= " AND (d.prenom LIKE '%".$search_lastname."%' OR d.nom LIKE '%".$search_lastname."%')";
|
||||
}
|
||||
if (! empty($search_login))
|
||||
{
|
||||
@@ -460,8 +428,8 @@ if ($rowid > 0)
|
||||
|
||||
$param="&rowid=".$rowid;
|
||||
if (! empty($status)) $param.="&status=".$status;
|
||||
if (! empty($search_lastname)) $param.="&search_lastname=".$search_lastname;
|
||||
if (! empty($search_firstname)) $param.="&search_firstname=".$search_firstname;
|
||||
if (! empty($search_lastname)) $param.="&search_nom=".$search_lastname;
|
||||
if (! empty($search_firstname)) $param.="&search_prenom=".$search_firstname;
|
||||
if (! empty($search_login)) $param.="&search_login=".$search_login;
|
||||
if (! empty($search_email)) $param.="&search_email=".$search_email;
|
||||
if (! empty($filter)) $param.="&filter=".$filter;
|
||||
@@ -476,7 +444,7 @@ if ($rowid > 0)
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.lastname",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.nom",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Login"),$_SERVER["PHP_SELF"],"d.login",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Person"),$_SERVER["PHP_SELF"],"d.morphy",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"d.email",$param,"","",$sortfield,$sortorder);
|
||||
@@ -492,7 +460,7 @@ if ($rowid > 0)
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" name="search_lastname" value="'.$search_lastname.'" size="12"></td>';
|
||||
print '<input class="flat" type="text" name="search_nom" value="'.$search_lastname.'" size="12"></td>';
|
||||
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" name="search_login" value="'.$search_login.'" size="7"></td>';
|
||||
@@ -524,7 +492,7 @@ if ($rowid > 0)
|
||||
$adh->lastname=$objp->lastname;
|
||||
$adh->firstname=$objp->firstname;
|
||||
|
||||
// Lastname
|
||||
// Nom
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
if ($objp->societe != '')
|
||||
@@ -540,7 +508,7 @@ if ($rowid > 0)
|
||||
print "<td>".$objp->login."</td>\n";
|
||||
|
||||
// Type
|
||||
/*print '<td class="nowrap">';
|
||||
/*print '<td nowrap="nowrap">';
|
||||
$membertypestatic->id=$objp->type_id;
|
||||
$membertypestatic->libelle=$objp->type;
|
||||
print $membertypestatic->getNomUrl(1,12);
|
||||
@@ -554,14 +522,14 @@ if ($rowid > 0)
|
||||
print "<td>".dol_print_email($objp->email,0,0,1)."</td>\n";
|
||||
|
||||
// Statut
|
||||
print '<td class="nowrap">';
|
||||
print '<td nowrap="nowrap">';
|
||||
print $adh->LibStatut($objp->statut,$objp->cotisation,$datefin,2);
|
||||
print "</td>";
|
||||
|
||||
// Date fin cotisation
|
||||
if ($datefin)
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td align="center" nowrap="nowrap">';
|
||||
if ($datefin < time() && $objp->statut > 0)
|
||||
{
|
||||
print dol_print_date($datefin,'day')." ".img_warning($langs->trans("SubscriptionLate"));
|
||||
@@ -574,7 +542,7 @@ if ($rowid > 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="left" class="nowrap">';
|
||||
print '<td align="left" nowrap="nowrap">';
|
||||
if ($objp->cotisation == 'yes')
|
||||
{
|
||||
print $langs->trans("SubscriptionNotReceived");
|
||||
@@ -625,7 +593,7 @@ if ($rowid > 0)
|
||||
$adht = new AdherentType($db);
|
||||
$adht->id = $rowid;
|
||||
$adht->fetch($rowid);
|
||||
$adht->fetch_optionals($rowid,$extralabels);
|
||||
|
||||
|
||||
$h=0;
|
||||
|
||||
@@ -663,26 +631,8 @@ if ($rowid > 0)
|
||||
$doleditor->Create();
|
||||
print "</td></tr>";
|
||||
|
||||
// Other attributes
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
print '</table>';
|
||||
|
||||
//Extra field
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
print '<br><br><table class="border" width="100%">';
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($adht->array_options['options_'.$key])?$adht->array_options['options_'.$key]:''));
|
||||
print '<tr><td width="30%">'.$label.'</td><td>';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
print '</table><br><br>';
|
||||
}
|
||||
|
||||
print '<center><input type="submit" class="button" value="'.$langs->trans("Save").'"> ';
|
||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'"></center>';
|
||||
|
||||
|
||||
@@ -212,6 +212,26 @@ $list=array('COMPTA_PRODUCT_BUY_ACCOUNT','COMPTA_PRODUCT_SOLD_ACCOUNT','COMPTA_S
|
||||
'COMPTA_VAT_ACCOUNT','COMPTA_ACCOUNT_CUSTOMER','COMPTA_ACCOUNT_SUPPLIER'
|
||||
);
|
||||
|
||||
/*$sql = "SELECT rowid, name, value, type, note";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."const";
|
||||
$sql.= " WHERE name LIKE 'COMPTA_%'";
|
||||
$sql.= " AND name NOT IN ('COMPTA_MODE')";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
$list[$obj->name]=$obj->value;
|
||||
$i++;
|
||||
}
|
||||
}*/
|
||||
|
||||
$num=count($list);
|
||||
if ($num)
|
||||
{
|
||||
|
||||
@@ -65,8 +65,8 @@ else
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
* Actions
|
||||
*/
|
||||
if ($action == "save" && empty($cancel))
|
||||
{
|
||||
$i=0;
|
||||
@@ -125,7 +125,7 @@ if (preg_match('/del_(.*)/',$action,$reg))
|
||||
|
||||
|
||||
/**
|
||||
* View
|
||||
* Affichage du formulaire de saisie
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
@@ -134,14 +134,13 @@ $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToM
|
||||
print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'setup');
|
||||
print "<br>\n";
|
||||
|
||||
print $langs->trans("AgendaAutoActionDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
$head=agenda_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'autoactions', $langs->trans("Agenda"));
|
||||
|
||||
print $langs->trans("AgendaAutoActionDesc")."<br>\n";
|
||||
print $langs->trans("OnlyActiveElementsAreShown").'<br>';
|
||||
print "<br>\n";
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@@ -180,17 +179,59 @@ print '</table>';
|
||||
|
||||
print '<br><center>';
|
||||
print '<input type="submit" name="save" class="button" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'">';
|
||||
print "</center>";
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
dol_fiche_end();
|
||||
print '</div>';
|
||||
|
||||
/*
|
||||
* Other options
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("OtherOptions"));
|
||||
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder allwidth">'."\n";
|
||||
print '<tr class="liste_titre">'."\n";
|
||||
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
||||
print '<td align="center" width="20"> </td>'."\n";
|
||||
print '<td align="center" width="100">'.$langs->trans("Value").'</td>'."\n";
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Manual or automatic
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>'."\n";
|
||||
print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE").'</td>'."\n";
|
||||
print '<td align="center" width="20"> </td>'."\n";
|
||||
|
||||
print '<td align="center" width="100">'."\n";
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print ajax_constantonoff('AGENDA_USE_EVENT_TYPE');
|
||||
}
|
||||
else
|
||||
{
|
||||
if($conf->global->AGENDA_USE_EVENT_TYPE == 0)
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_USE_EVENT_TYPE">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
else if($conf->global->BUSINESS_VISIBLE_TO_ALL_BY_DEFAULT == 1)
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_USE_EVENT_TYPE">'.img_picto($langs->trans("Enabled"),'on').'</a>';
|
||||
}
|
||||
}
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
|
||||
print "<br>";
|
||||
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
?>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
@@ -35,7 +35,6 @@ if (!$user->admin)
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("other");
|
||||
$langs->load("agenda");
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$form = new Form($db);
|
||||
@@ -47,7 +46,7 @@ foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);
|
||||
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$attrname=GETPOST('attrname', 'alpha');
|
||||
$elementtype='actioncomm'; //Must be the $table_element of the class that manage extrafield
|
||||
$elementtype='actioncomm';
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
|
||||
@@ -64,14 +63,15 @@ require DOL_DOCUMENT_ROOT.'/core/admin_extrafields.inc.php';
|
||||
* View
|
||||
*/
|
||||
|
||||
$textobject=$langs->transnoentitiesnoconv("Agenda");
|
||||
|
||||
llxHeader('',$langs->trans("AgendaSetup"));
|
||||
llxHeader();
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'setup');
|
||||
print "<br>\n";
|
||||
|
||||
print "<br>\n";
|
||||
|
||||
$head=agenda_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("Agenda"));
|
||||
@@ -79,6 +79,8 @@ dol_fiche_head($head, 'attributes', $langs->trans("Agenda"));
|
||||
print $langs->trans("DefineHereComplementaryAttributes", $langs->transnoentitiesnoconv("Agenda")).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
dol_htmloutput_errors($mesg);
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
@@ -108,6 +110,7 @@ foreach($extrafields->attribute_type as $key => $value)
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
// $i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
@@ -126,8 +129,8 @@ if ($action != 'create' && $action != 'edit')
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Creation d'un champ optionnel */
|
||||
/* */
|
||||
/* Creation d'un champ optionnel
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
if ($action == 'create')
|
||||
@@ -154,4 +157,4 @@ if ($action == 'edit' && ! empty($attrname))
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
?>
|
||||
@@ -54,45 +54,32 @@ if ($actionsave)
|
||||
$db->begin();
|
||||
|
||||
$disableext=GETPOST('AGENDA_DISABLE_EXT','alpha');
|
||||
$res=dolibarr_set_const($db,'AGENDA_DISABLE_EXT',$disableext,'chaine',0,'',$conf->entity);
|
||||
if ($disableext) $disableext=0; else $disableext=1;
|
||||
$res=dolibarr_set_const($db,'AGENDA_DISABLE_EXT',$disableext,'chaine',0);
|
||||
|
||||
$i=1; $errorsaved=0;
|
||||
$i=1;
|
||||
$error=0;
|
||||
|
||||
// Save agendas
|
||||
while ($i <= $MAXAGENDA)
|
||||
{
|
||||
$name=trim(GETPOST('agenda_ext_name'.$i),'alpha');
|
||||
$src=trim(GETPOST('agenda_ext_src'.$i,'alpha'));
|
||||
$color=trim(GETPOST('agenda_ext_color'.$i,'alpha'));
|
||||
if ($color=='-1') $color='';
|
||||
|
||||
if (! empty($src) && ! preg_match('/^(http\s*|ftp\s*):/', $src))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorParamMustBeAnUrl"),'errors');
|
||||
$error++;
|
||||
$errorsaved++;
|
||||
break;
|
||||
}
|
||||
|
||||
//print 'color='.$color;
|
||||
$res=dolibarr_set_const($db,'AGENDA_EXT_NAME'.$i,$name,'chaine',0,'',$conf->entity);
|
||||
$res=dolibarr_set_const($db,'AGENDA_EXT_NAME'.$i,trim(GETPOST('agenda_ext_name'.$i),'alpha'),'chaine',0);
|
||||
if (! $res > 0) $error++;
|
||||
$res=dolibarr_set_const($db,'AGENDA_EXT_SRC'.$i,$src,'chaine',0,'',$conf->entity);
|
||||
$res=dolibarr_set_const($db,'AGENDA_EXT_SRC'.$i,trim(GETPOST('agenda_ext_src'.$i,'alpha')),'chaine',0);
|
||||
if (! $res > 0) $error++;
|
||||
$res=dolibarr_set_const($db,'AGENDA_EXT_COLOR'.$i,$color,'chaine',0,'',$conf->entity);
|
||||
$res=dolibarr_set_const($db,'AGENDA_EXT_COLOR'.$i,$color,'chaine',0);
|
||||
if (! $res > 0) $error++;
|
||||
$i++;
|
||||
}
|
||||
|
||||
// Save nb of agenda
|
||||
if (! $error)
|
||||
{
|
||||
$res=dolibarr_set_const($db,'AGENDA_EXT_NB',trim(GETPOST('AGENDA_EXT_NB','alpha')),'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB=5;
|
||||
$MAXAGENDA=empty($conf->global->AGENDA_EXT_NB)?5:$conf->global->AGENDA_EXT_NB;
|
||||
}
|
||||
$res=dolibarr_set_const($db,'AGENDA_EXT_NB',trim(GETPOST('AGENDA_EXT_NB','alpha')),'chaine',0);
|
||||
if (! $res > 0) $error++;
|
||||
if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB=5;
|
||||
$MAXAGENDA=empty($conf->global->AGENDA_EXT_NB)?5:$conf->global->AGENDA_EXT_NB;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
@@ -102,7 +89,7 @@ if ($actionsave)
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
if (empty($errorsaved)) $mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
||||
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,55 +110,32 @@ $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToM
|
||||
print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'setup');
|
||||
print '<br>';
|
||||
|
||||
print $langs->trans("AgendaExtSitesDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
$head=agenda_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'extsites', $langs->trans("Agenda"));
|
||||
|
||||
print $langs->trans("AgendaExtSitesDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
print '<form name="extsitesconfig" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
|
||||
$selectedvalue=$conf->global->AGENDA_DISABLE_EXT;
|
||||
$selectedvalue=(GETPOST('AGENDA_DISABLE_AGENDA','alpha'))?GETPOST('AGENDA_DISABLE_EXT','alpha'):$conf->global->AGENDA_DISABLE_EXT;
|
||||
if ($selectedvalue==1) $selectedvalue=0; else $selectedvalue=1;
|
||||
print $langs->trans("ExtSitesEnableThisTool").' '.$form->selectyesno("AGENDA_DISABLE_EXT",$selectedvalue,1).'<br><br>';
|
||||
|
||||
$var=true;
|
||||
$var=false;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print '<td>'.$langs->trans("Parameter")."</td>";
|
||||
print '<td align="center">'.$langs->trans("Value")."</td>";
|
||||
print "</tr>";
|
||||
|
||||
// Show external agenda
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$langs->trans("ExtSitesEnableThisTool")."</td>";
|
||||
print '<td align="center">';
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print ajax_constantonoff('AGENDA_DISABLE_EXT',array('enabled'=>array(0=>'.hideifnotset')),null,1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if($conf->global->AGENDA_DISABLE_EXT == 0)
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?save=1&AGENDA_DISABLE_EXT=1">'.img_picto($langs->trans("Enabled"),'on').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?save=1&AGENDA_DISABLE_EXT=0">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
}
|
||||
print "</td>";
|
||||
print '<td width="180">'.$langs->trans("Parameter")."</td>";
|
||||
print "<td>".$langs->trans("Value")."</td>";
|
||||
print "</tr>";
|
||||
|
||||
// Nb of agenda
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$langs->trans("ExtSitesNbOfAgenda")."</td>";
|
||||
print '<td align="center">';
|
||||
print '<input class="flat hideifnotset" type="text" size="2" id="AGENDA_EXT_NB" name="AGENDA_EXT_NB" value="'.$conf->global->AGENDA_EXT_NB.'">';
|
||||
print "<td>";
|
||||
print '<input class="flat" type="text" size="2" name="AGENDA_EXT_NB" value="'.$conf->global->AGENDA_EXT_NB.'">';
|
||||
print "</td>";
|
||||
print "</tr>";
|
||||
|
||||
@@ -184,7 +148,7 @@ print "<tr class=\"liste_titre\">";
|
||||
print "<td>".$langs->trans("Parameter")."</td>";
|
||||
print "<td>".$langs->trans("Name")."</td>";
|
||||
print "<td>".$langs->trans("ExtSiteUrlAgenda")." (".$langs->trans("Example").': http://yoursite/agenda/agenda.ics)</td>';
|
||||
print '<td align="right">'.$langs->trans("Color").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Color").'</td>';
|
||||
print "</tr>";
|
||||
|
||||
$i=1;
|
||||
@@ -192,22 +156,18 @@ $var=true;
|
||||
while ($i <= $MAXAGENDA)
|
||||
{
|
||||
$key=$i;
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td width="180" nowrap="nowrap">'.$langs->trans("AgendaExtNb",$key)."</td>";
|
||||
$name='AGENDA_EXT_NAME'.$key;
|
||||
$src='AGENDA_EXT_SRC'.$key;
|
||||
$color='AGENDA_EXT_COLOR'.$key;
|
||||
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
// Nb
|
||||
print '<td width="180" class="nowrap">'.$langs->trans("AgendaExtNb",$key)."</td>";
|
||||
// Name
|
||||
print '<td><input type="text" class="flat hideifnotset" name="agenda_ext_name'.$key.'" value="'. (GETPOST('agenda_ext_name'.$key)?GETPOST('agenda_ext_name'.$key):$conf->global->$name) . '" size="28"></td>';
|
||||
// URL
|
||||
print '<td><input type="url" class="flat hideifnotset" name="agenda_ext_src'.$key.'" value="'. (GETPOST('agenda_ext_src'.$key)?GETPOST('agenda_ext_src'.$key):$conf->global->$src) . '" size="60"></td>';
|
||||
// Color (Possible colors are limited by Google)
|
||||
print '<td class="nowrap" align="right">';
|
||||
//print $formadmin->selectColor($conf->global->$color, "google_agenda_color".$key, $colorlist);
|
||||
print $formother->selectColor((GETPOST("agenda_ext_color".$key)?GETPOST("agenda_ext_color".$key):$conf->global->$color), "agenda_ext_color".$key, 'extsitesconfig', 1, '', 'hideifnotset');
|
||||
print "<td><input type=\"text\" class=\"flat\" name=\"agenda_ext_name".$key."\" value=\"". $conf->global->$name . "\" size=\"28\"></td>";
|
||||
print "<td><input type=\"text\" class=\"flat\" name=\"agenda_ext_src".$key."\" value=\"". $conf->global->$src . "\" size=\"60\"></td>";
|
||||
print '<td nowrap="nowrap" align="center">';
|
||||
// Possible colors are limited by Google
|
||||
//print $formadmin->select_colors($conf->global->$color, "google_agenda_color".$key, $colorlist);
|
||||
print $formother->select_color($conf->global->$color, "agenda_ext_color".$key, 'extsitesconfig', 1, '');
|
||||
print '</td>';
|
||||
print "</tr>";
|
||||
$i++;
|
||||
@@ -227,8 +187,7 @@ dol_fiche_end();
|
||||
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
@@ -1,135 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2008-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* 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 3 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/admin/agenda.php
|
||||
* \ingroup agenda
|
||||
* \brief Autocreate actions for agenda module setup page
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
|
||||
|
||||
if (!$user->admin)
|
||||
accessforbidden();
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("other");
|
||||
|
||||
$action = GETPOST('action','alpha');
|
||||
$cancel = GETPOST('cancel','alpha');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (preg_match('/set_(.*)/',$action,$reg))
|
||||
{
|
||||
$code=$reg[1];
|
||||
$value=(GETPOST($code) ? GETPOST($code) : 1);
|
||||
if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0)
|
||||
{
|
||||
Header("Location: ".$_SERVER["PHP_SELF"]);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
if (preg_match('/del_(.*)/',$action,$reg))
|
||||
{
|
||||
$code=$reg[1];
|
||||
if (dolibarr_del_const($db, $code, $conf->entity) > 0)
|
||||
{
|
||||
Header("Location: ".$_SERVER["PHP_SELF"]);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'setup');
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
$head=agenda_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'other', $langs->trans("Agenda"));
|
||||
|
||||
print_titre($langs->trans("OtherOptions"));
|
||||
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder allwidth">'."\n";
|
||||
print '<tr class="liste_titre">'."\n";
|
||||
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
||||
print '<td align="center" width="20"> </td>'."\n";
|
||||
print '<td align="center" width="100">'.$langs->trans("Value").'</td>'."\n";
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Manual or automatic
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>'."\n";
|
||||
print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE").'</td>'."\n";
|
||||
print '<td align="center" width="20"> </td>'."\n";
|
||||
|
||||
print '<td align="center" width="100">'."\n";
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print ajax_constantonoff('AGENDA_USE_EVENT_TYPE');
|
||||
}
|
||||
else
|
||||
{
|
||||
if($conf->global->AGENDA_USE_EVENT_TYPE == 0)
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_USE_EVENT_TYPE">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
else if($conf->global->BUSINESS_VISIBLE_TO_ALL_BY_DEFAULT == 1)
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_USE_EVENT_TYPE">'.img_picto($langs->trans("Enabled"),'on').'</a>';
|
||||
}
|
||||
}
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print "<br>";
|
||||
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
@@ -75,13 +75,13 @@ $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToM
|
||||
print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'setup');
|
||||
print '<br>';
|
||||
|
||||
print $langs->trans("AgendaSetupOtherDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
$head=agenda_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'xcal', $langs->trans("Agenda"));
|
||||
|
||||
print $langs->trans("AgendaSetupOtherDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
print '<form name="agendasetupform" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -28,7 +28,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("boxes");
|
||||
|
||||
if (! $user->admin) accessforbidden();
|
||||
|
||||
@@ -36,8 +35,9 @@ $rowid = GETPOST('rowid','int');
|
||||
$action = GETPOST('action','alpha');
|
||||
$errmesg='';
|
||||
|
||||
// Define possible position of boxes
|
||||
$pos_name = getStaticMember('InfoBox','listOfPages');
|
||||
// Definition des positions possibles pour les boites
|
||||
$pos_array = array(0); // Positions possibles pour une boite (0,1,2,...)
|
||||
$pos_name = array(0=>$langs->trans("Home")); // Nom des positions 0=Homepage, 1=...
|
||||
$boxes = array();
|
||||
|
||||
|
||||
@@ -236,14 +236,12 @@ $sql.= " AND b.box_id = bd.rowid";
|
||||
$sql.= " AND b.fk_user=0";
|
||||
$sql.= " ORDER by b.position, b.box_order";
|
||||
|
||||
dol_syslog("Search available boxes sql=".$sql, LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$decalage=0;
|
||||
$var=false;
|
||||
while ($i < $num)
|
||||
{
|
||||
$var = ! $var;
|
||||
@@ -315,7 +313,7 @@ if ($resql)
|
||||
}
|
||||
|
||||
|
||||
// Available boxes to activate
|
||||
// Available boxes
|
||||
$boxtoadd=InfoBox::listBoxes($db,'available',-1,null,$actives);
|
||||
|
||||
print "<br>\n";
|
||||
@@ -346,22 +344,13 @@ foreach($boxtoadd as $box)
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.img_object("",$logo).' '.$langs->transnoentitiesnoconv($box->boxlabel);
|
||||
if (! empty($box->class) && preg_match('/graph_/',$box->class)) print ' ('.$langs->trans("Graph").')';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if ($box->note == '(WarningUsingThisBoxSlowDown)')
|
||||
{
|
||||
$langs->load("errors");
|
||||
print $langs->trans("WarningUsingThisBoxSlowDown");
|
||||
}
|
||||
else print ($box->note?$box->note:' ');
|
||||
print '</td>';
|
||||
print '<td>'.img_object("",$logo).' '.$box->boxlabel.'</td>';
|
||||
print '<td>' . ($box->note?$box->note:' ') . '</td>';
|
||||
print '<td>' . $box->sourcefile . '</td>';
|
||||
|
||||
// Pour chaque position possible, on affiche un lien d'activation si boite non deja active pour cette position
|
||||
print '<td>';
|
||||
print $form->selectarray("pos",$pos_name,0,0,0,0,'',1);
|
||||
print $form->selectarray("pos",$pos_name);
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="boxid" value="'.$box->box_id.'">';
|
||||
print ' <input type="submit" class="button" name="button" value="'.$langs->trans("Activate").'">';
|
||||
@@ -407,18 +396,9 @@ foreach($boxactivated as $key => $box)
|
||||
|
||||
print "\n".'<!-- Box '.$box->boxcode.' -->'."\n";
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.img_object("",$logo).' '.$langs->transnoentitiesnoconv($box->boxlabel);
|
||||
if (! empty($box->class) && preg_match('/graph_/',$box->class)) print ' ('.$langs->trans("Graph").')';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if ($box->note == '(WarningUsingThisBoxSlowDown)')
|
||||
{
|
||||
$langs->load("errors");
|
||||
print img_warning('',0).' '.$langs->trans("WarningUsingThisBoxSlowDown");
|
||||
}
|
||||
else print ($box->note?$box->note:' ');
|
||||
print '</td>';
|
||||
print '<td align="center">' . (empty($pos_name[$box->position])?'':$langs->trans($pos_name[$box->position])) . '</td>';
|
||||
print '<td>'.img_object("",$logo).' '.$box->boxlabel.'</td>';
|
||||
print '<td>' . ($box->note?$box->note:' ') . '</td>';
|
||||
print '<td align="center">' . (isset($pos_name[$box->position])?$pos_name[$box->position]:'') . '</td>';
|
||||
$hasnext=($key < (count($boxactivated)-1));
|
||||
$hasprevious=($key != 0);
|
||||
print '<td align="center">'.($key+1).'</td>';
|
||||
|
||||
@@ -38,7 +38,7 @@ $action = GETPOST("action");
|
||||
*/
|
||||
if ($action == 'setvalue' && $user->admin)
|
||||
{
|
||||
$result=dolibarr_set_const($db, "CLICKTODIAL_URL", GETPOST("url"), 'chaine', 0, '', $conf->entity);
|
||||
$result=dolibarr_set_const($db, "CLICKTODIAL_URL",GETPOST("url"),'chaine',0,'',$conf->entity);
|
||||
if ($result >= 0)
|
||||
{
|
||||
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
||||
@@ -54,8 +54,6 @@ if ($action == 'setvalue' && $user->admin)
|
||||
* View
|
||||
*/
|
||||
|
||||
$user->fetch_clicktodial();
|
||||
|
||||
$wikihelp='EN:Module_ClickToDial_En|FR:Module_ClickToDial|ES:Módulo_ClickTodial_Es';
|
||||
llxHeader('',$langs->trans("ClickToDialSetup"),$wikihelp);
|
||||
|
||||
@@ -71,67 +69,33 @@ print '<input type="hidden" name="action" value="setvalue">';
|
||||
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<table class="nobordernopadding" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="120">'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td valign="top">';
|
||||
print $langs->trans("DefaultLink").'</td><td>';
|
||||
print $langs->trans("URL").'</td><td>';
|
||||
print '<input size="92" type="text" name="url" value="'.$conf->global->CLICKTODIAL_URL.'"><br>';
|
||||
print '<br>';
|
||||
print $langs->trans("ClickToDialUrlDesc").'<br>';
|
||||
print $langs->trans("Example").':<br>http://myphoneserver/mypage?login=__LOGIN__&password=__PASS__&caller=__PHONEFROM__&called=__PHONETO__';
|
||||
|
||||
//if (! empty($user->clicktodial_url))
|
||||
//{
|
||||
print '<br>';
|
||||
print info_admin($langs->trans("ValueOverwrittenByUserSetup"));
|
||||
//}
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '<tr><td colspan="3" align="center"><br><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>';
|
||||
print '</table></form>';
|
||||
|
||||
print '<center><br><input type="submit" class="button" value="'.$langs->trans("Modify").'"></center>';
|
||||
|
||||
print '</form><br><br>';
|
||||
|
||||
|
||||
if (! empty($conf->global->CLICKTODIAL_URL))
|
||||
{
|
||||
$user->fetch_clicktodial();
|
||||
|
||||
$phonefortest=$mysoc->phone;
|
||||
if (GETPOST('phonefortest')) $phonefortest=GETPOST('phonefortest');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print $langs->trans("LinkToTestClickToDial",$user->login).' : ';
|
||||
print '<input class="flat" type="text" name="phonefortest" value="'.dol_escape_htmltag($phonefortest).'">';
|
||||
print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("RefreshPhoneLink")).'">';
|
||||
print '</form>';
|
||||
|
||||
$setupcomplete=1;
|
||||
if (preg_match('/__LOGIN__/',$conf->global->CLICKTODIAL_URL) && empty($user->clicktodial_login)) $setupcomplete=0;
|
||||
if (preg_match('/__PASSWORD__/',$conf->global->CLICKTODIAL_URL) && empty($user->clicktodial_password)) $setupcomplete=0;
|
||||
if (preg_match('/__PHONEFROM__/',$conf->global->CLICKTODIAL_URL) && empty($user->clicktodial_poste)) $setupcomplete=0;
|
||||
|
||||
if ($setupcomplete)
|
||||
{
|
||||
print $langs->trans("LinkToTest",$user->login).': '.dol_print_phone($phonefortest, '', 0, 0, 'AC_TEL');
|
||||
}
|
||||
else
|
||||
{
|
||||
$langs->load("errors");
|
||||
print '<div class="warning">'.$langs->trans("WarningClickToDialUserSetupNotComplete").'</div>';
|
||||
}
|
||||
}
|
||||
/*if (! empty($conf->global->CLICKTODIAL_URL))
|
||||
{
|
||||
print $langs->trans("Test");
|
||||
// Add a phone number to test
|
||||
}
|
||||
*/
|
||||
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2004 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
*
|
||||
* 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
|
||||
@@ -33,7 +32,6 @@
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("errors");
|
||||
@@ -44,10 +42,6 @@ if (! $user->admin) accessforbidden();
|
||||
|
||||
$action = GETPOST('action','alpha');
|
||||
$value = GETPOST('value','alpha');
|
||||
$label = GETPOST('label','alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
$type = 'order';
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@@ -120,13 +114,30 @@ else if ($action == 'specimen')
|
||||
// Activate a model
|
||||
else if ($action == 'set')
|
||||
{
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
$label = GETPOST('label','alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
|
||||
$type='order';
|
||||
$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))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
$type='order';
|
||||
$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->COMMANDE_ADDON_PDF == "$value") dolibarr_del_const($db, 'COMMANDE_ADDON_PDF',$conf->entity);
|
||||
}
|
||||
@@ -135,18 +146,41 @@ else if ($action == 'del')
|
||||
// Set default model
|
||||
else if ($action == 'setdoc')
|
||||
{
|
||||
$label = GETPOST('label','alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
|
||||
$db->begin();
|
||||
|
||||
if (dolibarr_set_const($db, "COMMANDE_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->COMMANDE_ADDON_PDF = $value;
|
||||
}
|
||||
|
||||
// On active le modele
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
$type='order';
|
||||
|
||||
$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;
|
||||
dol_syslog("Delete from model table ".$sql_del);
|
||||
$result1=$db->query($sql_del);
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
|
||||
$sql.= " VALUES ('".$value."', '".$type."', ".$conf->entity.", ";
|
||||
$sql.= ($label?"'".$db->escape($label)."'":'null').", ";
|
||||
$sql.= (! empty($scandir)?"'".$scandir."'":"null");
|
||||
$sql.= ")";
|
||||
dol_syslog("Insert into model table ".$sql);
|
||||
$result2=$db->query($sql);
|
||||
if ($result1 && $result2)
|
||||
{
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
$db->commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog("Error ".$db->lasterror(), LOG_ERR);
|
||||
$db->rollback();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,14 +234,6 @@ else if ($action=='setModuleOptions') {
|
||||
$conf->global->COMMANDE_ADDON_PDF_ODT_PATH = GETPOST('value1');
|
||||
}
|
||||
}
|
||||
else if ($action=='setModuleOptions') {
|
||||
if (dolibarr_set_const($db, "COMMANDE_ADDON_PDF_ODT_PATH",GETPOST('value1'),'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->COMMANDE_ADDON_PDF_ODT_PATH = GETPOST('value1');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@@ -224,12 +250,10 @@ $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToM
|
||||
print_fiche_titre($langs->trans("OrdersSetup"),$linkback,'setup');
|
||||
print '<br>';
|
||||
|
||||
$head = order_admin_prepare_head(null);
|
||||
|
||||
dol_fiche_head($head, 'general', $langs->trans("ModuleSetup"), 0, 'order');
|
||||
|
||||
/*
|
||||
* Orders Numbering model
|
||||
* Numbering module
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("OrdersNumberingModules"));
|
||||
@@ -238,7 +262,7 @@ print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td class="nowrap">'.$langs->trans("Example").'</td>';
|
||||
print '<td nowrap="nowrap">'.$langs->trans("Example").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
|
||||
print '<td align="center" width="16">'.$langs->trans("Infos").'</td>';
|
||||
print '</tr>'."\n";
|
||||
@@ -262,23 +286,23 @@ foreach ($dirmodels as $reldir)
|
||||
{
|
||||
$file = substr($file, 0, dol_strlen($file)-4);
|
||||
|
||||
require_once $dir.$file.'.php';
|
||||
require_once DOL_DOCUMENT_ROOT ."/core/modules/commande/".$file.'.php';
|
||||
|
||||
$module = new $file;
|
||||
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
|
||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
|
||||
|
||||
if ($module->isEnabled())
|
||||
{
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
|
||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$module->nom."</td><td>\n";
|
||||
print $module->info();
|
||||
print '</td>';
|
||||
|
||||
// Show example of numbering model
|
||||
print '<td class="nowrap">';
|
||||
// Show example of numbering module
|
||||
print '<td nowrap="nowrap">';
|
||||
$tmp=$module->getExample();
|
||||
if (preg_match('/^Error/',$tmp)) print '<div class="error">'.$langs->trans($tmp).'</div>';
|
||||
elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
|
||||
@@ -494,14 +518,11 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
//Autres Options
|
||||
print "<br>";
|
||||
|
||||
/*
|
||||
* Other options
|
||||
*
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("OtherOptions"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
@@ -61,14 +61,14 @@ if ( ($action == 'update' && empty($_POST["cancel"]))
|
||||
$mysoc->country_label=$tmparray['label'];
|
||||
|
||||
$s=$mysoc->country_id.':'.$mysoc->country_code.':'.$mysoc->country_label;
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_COUNTRY", $s,'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_PAYS", $s,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$_POST["nom"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADDRESS",$_POST["address"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TOWN",$_POST["town"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ZIP",$_POST["zipcode"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_STATE",$_POST["state_id"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADRESSE",$_POST["address"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_VILLE",$_POST["ville"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_CP",$_POST["cp"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_DEPARTEMENT",$_POST["departement_id"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_MONNAIE",$_POST["currency"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TEL",$_POST["tel"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FAX",$_POST["fax"],'chaine',0,'',$conf->entity);
|
||||
@@ -268,7 +268,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><th width="35%">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("CompanyInfo").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td class="fieldrequired">'.$langs->trans("CompanyName").'</td><td>';
|
||||
@@ -276,27 +276,27 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyAddress").'</td><td>';
|
||||
print '<textarea name="address" cols="80" rows="'.ROWS_3.'">'. ($conf->global->MAIN_INFO_SOCIETE_ADDRESS?$conf->global->MAIN_INFO_SOCIETE_ADDRESS:$_POST["address"]) . '</textarea></td></tr>'."\n";
|
||||
print '<textarea name="address" cols="80" rows="'.ROWS_3.'">'. ($conf->global->MAIN_INFO_SOCIETE_ADRESSE?$conf->global->MAIN_INFO_SOCIETE_ADRESSE:$_POST["address"]) . '</textarea></td></tr>'."\n";
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyZip").'</td><td>';
|
||||
print '<input name="zipcode" value="'. ($conf->global->MAIN_INFO_SOCIETE_ZIP?$conf->global->MAIN_INFO_SOCIETE_ZIP:$_POST["zipcode"]) . '" size="10"></td></tr>'."\n";
|
||||
print '<input name="cp" value="'. ($conf->global->MAIN_INFO_SOCIETE_CP?$conf->global->MAIN_INFO_SOCIETE_CP:$_POST["cp"]) . '" size="10"></td></tr>'."\n";
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyTown").'</td><td>';
|
||||
print '<input name="town" size="30" value="'. ($conf->global->MAIN_INFO_SOCIETE_TOWN?$conf->global->MAIN_INFO_SOCIETE_TOWN:$_POST["town"]) . '"></td></tr>'."\n";
|
||||
print '<input name="ville" size="30" value="'. ($conf->global->MAIN_INFO_SOCIETE_VILLE?$conf->global->MAIN_INFO_SOCIETE_VILLE:$_POST["ville"]) . '"></td></tr>'."\n";
|
||||
|
||||
// Country
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td class="fieldrequired">'.$langs->trans("Country").'</td><td>';
|
||||
//if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // Par defaut, pays de la localisation
|
||||
//if (empty($pays_selected)) $pays_selected=substr($langs->defaultlang,-2); // Par defaut, pays de la localisation
|
||||
print $form->select_country($mysoc->country_id,'country_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("State").'</td><td>';
|
||||
$formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_STATE,$mysoc->country_code,'state_id');
|
||||
$formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT,$mysoc->country_code,'departement_id');
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
$var=!$var;
|
||||
@@ -336,7 +336,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
|
||||
// Logo
|
||||
$var=!$var;
|
||||
print '<tr'.dol_bc($var,'hideonsmartphone').'><td>'.$langs->trans("Logo").' (png,jpg)</td><td>';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("Logo").' (png,jpg)</td><td>';
|
||||
print '<table width="100%" class="nocellnopadd"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
|
||||
print '<input type="file" class="flat" name="logo" size="50">';
|
||||
print '</td><td valign="middle" align="right">';
|
||||
@@ -366,7 +366,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Identifiants de la societe (country-specific)
|
||||
// Identifiants de la societe (propre au pays)
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
$var=true;
|
||||
@@ -547,7 +547,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
/*
|
||||
* Local Taxes
|
||||
*/
|
||||
if ($mysoc->useLocalTax(1))
|
||||
if ($mysoc->hasLocalTax(1))
|
||||
{
|
||||
// Local Tax 1
|
||||
print '<br>';
|
||||
@@ -579,7 +579,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
print "</td></tr>\n";
|
||||
print "</table>";
|
||||
}
|
||||
if ($mysoc->useLocalTax(2))
|
||||
if ($mysoc->hasLocalTax(2))
|
||||
{
|
||||
// Local Tax 2
|
||||
print '<br>';
|
||||
@@ -646,13 +646,13 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyAddress").'</td><td>' . nl2br(empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS)?'':$conf->global->MAIN_INFO_SOCIETE_ADDRESS) . '</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyAddress").'</td><td>' . nl2br($conf->global->MAIN_INFO_SOCIETE_ADRESSE) . '</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyZip").'</td><td>' . (empty($conf->global->MAIN_INFO_SOCIETE_ZIP)?'':$conf->global->MAIN_INFO_SOCIETE_ZIP) . '</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyZip").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_CP . '</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyTown").'</td><td>' . (empty($conf->global->MAIN_INFO_SOCIETE_TOWN)?'':$conf->global->MAIN_INFO_SOCIETE_TOWN) . '</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyTown").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_VILLE . '</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyCountry").'</td><td>';
|
||||
@@ -667,14 +667,14 @@ else
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("State").'</td><td>';
|
||||
if (! empty($conf->global->MAIN_INFO_SOCIETE_STATE)) print getState($conf->global->MAIN_INFO_SOCIETE_STATE);
|
||||
if (! empty($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT)) print getState($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyCurrency").'</td><td>';
|
||||
print currency_name($conf->currency,1);
|
||||
print ' ('.$langs->getCurrencySymbol($conf->currency).')';
|
||||
print ' ('.getCurrencySymbol($conf->currency).')';
|
||||
print '</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
@@ -731,7 +731,7 @@ else
|
||||
print '<br>';
|
||||
|
||||
|
||||
// Identifiants de la societe (country-specific)
|
||||
// Identifiants de la societe (propre au pays)
|
||||
print '<form name="formsoc" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
@@ -860,7 +860,7 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
$s.='<a href="'.$langs->transcountry("VATIntraCheckURL",$soc->id_country).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>';
|
||||
$s.='<a href="'.$langs->transcountry("VATIntraCheckURL",$soc->id_pays).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>';
|
||||
}
|
||||
}
|
||||
print $s;
|
||||
@@ -927,7 +927,7 @@ else
|
||||
/*
|
||||
* Local Taxes
|
||||
*/
|
||||
if ($mysoc->useLocalTax(1))
|
||||
if ($mysoc->hasLocalTax(1))
|
||||
{
|
||||
// Local Tax 1
|
||||
print '<br>';
|
||||
@@ -960,7 +960,7 @@ else
|
||||
|
||||
print "</table>";
|
||||
}
|
||||
if ($mysoc->useLocalTax(2))
|
||||
if ($mysoc->hasLocalTax(2))
|
||||
{
|
||||
// Local Tax 2
|
||||
print '<br>';
|
||||
@@ -997,7 +997,7 @@ else
|
||||
|
||||
// Actions buttons
|
||||
print '<div class="tabsAction">';
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a></div>';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@@ -36,10 +35,6 @@ accessforbidden();
|
||||
|
||||
$action = GETPOST('action','alpha');
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$compta_mode = defined('COMPTA_MODE')?COMPTA_MODE:'RECETTES-DEPENSES';
|
||||
|
||||
if ($action == 'setcomptamode')
|
||||
@@ -92,7 +87,7 @@ if ($action == 'update' || $action == 'add')
|
||||
}*/
|
||||
|
||||
/*
|
||||
* View
|
||||
* Affichage page
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
@@ -102,18 +97,9 @@ $form=new Form($db);
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans('ComptaSetup'),$linkback,'setup');
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
$h = 0;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/compta.php";
|
||||
$head[$h][1] = $langs->trans("Accountancy");
|
||||
$head[$h][2] = 'Compta';
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
// Cas du parametre COMPTA_MODE
|
||||
|
||||
@@ -122,7 +122,7 @@ if (! empty($consts) && $action == 'delete')
|
||||
}
|
||||
}
|
||||
if ($nbdeleted > 0) setEventMessage($langs->trans("RecordDeleted"));
|
||||
$action='';
|
||||
$action='';
|
||||
}
|
||||
|
||||
// Delete line from delete picto
|
||||
@@ -130,7 +130,7 @@ if ($action == 'delete')
|
||||
{
|
||||
if (dolibarr_del_const($db, $rowid, $entity) >= 0)
|
||||
{
|
||||
setEventMessage($langs->trans("RecordDeleted"));
|
||||
setEventMessage($langs->trans("RecordDeleted"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -222,8 +222,8 @@ print '</form>';
|
||||
print "\n";
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug)?'?debug=1':'').'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" id="action" name="action" value="">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" id="action" name="action" value="">';
|
||||
|
||||
// Show constants
|
||||
$sql = "SELECT";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
*
|
||||
* 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
|
||||
@@ -28,7 +27,6 @@ require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("errors");
|
||||
$langs->load("contracts");
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
|
||||
@@ -90,20 +88,6 @@ print_fiche_titre($langs->trans("ContractsSetup"),$linkback,'setup');
|
||||
|
||||
print "<br>";
|
||||
|
||||
$h = 0;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/contract.php";
|
||||
$head[$h][1] = $langs->trans("Contracts");
|
||||
$head[$h][2] = 'Contract';
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup"));
|
||||
|
||||
/*
|
||||
* Contracts Numbering model
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("ContractsNumberingModules"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
@@ -145,8 +129,8 @@ if (is_resource($handle))
|
||||
print $module->info();
|
||||
print '</td>';
|
||||
|
||||
// Show example of numbering model
|
||||
print '<td class="nowrap">';
|
||||
// Show example of numbering module
|
||||
print '<td nowrap="nowrap">';
|
||||
$tmp=$module->getExample();
|
||||
if (preg_match('/^Error/',$tmp)) { $langs->load("errors"); print '<div class="error">'.$langs->trans($tmp).'</div>'; }
|
||||
elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
|
||||
|
||||