Merge remote branch 'upstream/develop' into printgcp
This commit is contained in:
commit
b6be372c4b
@ -131,8 +131,9 @@ script:
|
|||||||
# - cat upgrade370380.log
|
# - cat upgrade370380.log
|
||||||
- php upgrade2.php 3.7.0 3.8.0 ignoredbversion > upgrade370380-2.log
|
- php upgrade2.php 3.7.0 3.8.0 ignoredbversion > upgrade370380-2.log
|
||||||
- php upgrade.php 3.8.0 3.9.0 ignoredbversion > upgrade380390.log
|
- php upgrade.php 3.8.0 3.9.0 ignoredbversion > upgrade380390.log
|
||||||
|
- cat upgrade380390.log
|
||||||
- php upgrade2.php 3.8.0 3.9.0 ignoredbversion > upgrade380390-2.log
|
- php upgrade2.php 3.8.0 3.9.0 ignoredbversion > upgrade380390-2.log
|
||||||
# - cat upgrade370380-2.log
|
# - cat upgrade380390-2.log
|
||||||
- cd ../..
|
- cd ../..
|
||||||
- date
|
- date
|
||||||
- phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
- phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
||||||
|
|||||||
@ -146,6 +146,12 @@ source_file = htdocs/langs/en_US/holiday.lang
|
|||||||
source_lang = en_US
|
source_lang = en_US
|
||||||
type = MOZILLAPROPERTIES
|
type = MOZILLAPROPERTIES
|
||||||
|
|
||||||
|
[dolibarr.hrm]
|
||||||
|
file_filter = htdocs/langs/<lang>/hrm.lang
|
||||||
|
source_file = htdocs/langs/en_US/hrm.lang
|
||||||
|
source_lang = en_US
|
||||||
|
type = MOZILLAPROPERTIES
|
||||||
|
|
||||||
[dolibarr.incoterm]
|
[dolibarr.incoterm]
|
||||||
file_filter = htdocs/langs/<lang>/incoterm.lang
|
file_filter = htdocs/langs/<lang>/incoterm.lang
|
||||||
source_file = htdocs/langs/en_US/incoterm.lang
|
source_file = htdocs/langs/en_US/incoterm.lang
|
||||||
|
|||||||
@ -4,15 +4,14 @@ How to contribute to Dolibarr
|
|||||||
Bug reports and feature requests
|
Bug reports and feature requests
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](http://www.dolibarr.org/forum).
|
<a name=not-a-support-forum></a>*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](http://www.dolibarr.org/forum).
|
||||||
|
|
||||||
**NEW**
|
Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/Issues).
|
||||||
|
|
||||||
Issues are now managed on [GitHub](https://github.com/Dolibarr/dolibarr/Issues).
|
|
||||||
|
|
||||||
1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem.
|
1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem.
|
||||||
2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request.
|
2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request.
|
||||||
3. Report with as much detail as possible ([Use screenshots or even screencasts whenever possible](https://help.github.com/articles/issue-attachments)).
|
4. Tell us the version you are using!
|
||||||
|
3. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging informations whenever possible).
|
||||||
|
|
||||||
We're still figuring out how to migrate old issues to GitHub. In the meantime, they are still available at [Doliforge](https://doliforge.org/projects/dolibarr).
|
We're still figuring out how to migrate old issues to GitHub. In the meantime, they are still available at [Doliforge](https://doliforge.org/projects/dolibarr).
|
||||||
|
|
||||||
@ -41,9 +40,45 @@ Choose your base branch accordingly.
|
|||||||
### General rules
|
### General rules
|
||||||
Please don't edit the ChangeLog file. A project manager will update it from your commit messages.
|
Please don't edit the ChangeLog file. A project manager will update it from your commit messages.
|
||||||
|
|
||||||
### Commits
|
### <a name=commits></a>Commits
|
||||||
Use clear commit messages with the following structure:
|
Use clear commit messages with the following structure:
|
||||||
|
|
||||||
|
```
|
||||||
|
[KEYWORD] [ISSUENUM] DESC
|
||||||
|
|
||||||
|
LONGDESC
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Keyword
|
||||||
|
In uppercase to appear in ChangeLog when generated.
|
||||||
|
|
||||||
|
The keyword can be ommitted if your commit does not fit in any of the following categories:
|
||||||
|
- Fix: for a bug fix
|
||||||
|
- Close: for closing a referenced feature request
|
||||||
|
- New: for an unreferenced new feature (Opening a feature request and using close is prefered)
|
||||||
|
|
||||||
|
#### Issuenum
|
||||||
|
If your commit fixes a referenced bug or feature request.
|
||||||
|
|
||||||
|
In the form of a # followed by the GitHub issue number.
|
||||||
|
|
||||||
|
#### Desc
|
||||||
|
A short description of the commit content.
|
||||||
|
|
||||||
|
This should ideally be less than 50 characters.
|
||||||
|
|
||||||
|
#### LongDesc
|
||||||
|
A long description of the commit content.
|
||||||
|
|
||||||
|
You can really go to town here and explain in depth what you've been doing.
|
||||||
|
|
||||||
|
Feel free to express technical details, use cases or anything relevant to the current commit.
|
||||||
|
|
||||||
|
This section can span multiple lines.
|
||||||
|
|
||||||
|
Try to keep lines under 72 characters.
|
||||||
|
|
||||||
|
#### Samples
|
||||||
<pre>
|
<pre>
|
||||||
FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog)
|
FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog)
|
||||||
or
|
or
|
||||||
@ -57,8 +92,10 @@ Long description (Can span accross multiple lines).
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
### Pull Requests
|
### Pull Requests
|
||||||
When submitting a pull request, use same rule than Commits. With upper case keyword to appear into ChangeLog.
|
When submitting a pull request, use same rule as [Commits](#commits) for the message.
|
||||||
|
|
||||||
|
If your pull request only contains one commit, GitHub will be smart enough to fill it for you.
|
||||||
|
Otherwise, please be a bit verbose about what you're providing.
|
||||||
|
|
||||||
### Resources
|
### Resources
|
||||||
[Developer documentation](http://wiki.dolibarr.org/index.php/Developer_documentation)
|
[Developer documentation](http://wiki.dolibarr.org/index.php/Developer_documentation)
|
||||||
@ -67,18 +104,18 @@ Translations
|
|||||||
------------
|
------------
|
||||||
The source language (en_US) is maintained in the repository. See the [Code](#code) section above.
|
The source language (en_US) is maintained in the repository. See the [Code](#code) section above.
|
||||||
|
|
||||||
All other translations are managed online at [Transifex](https://www.transifex.com/projects/p/dolibarr).
|
All other translations are managed online at [Transifex](https://www.transifex.com/dolibarr-association/dolibarr/).
|
||||||
|
|
||||||
Join an existing translation team or create your own and translate into the interface.
|
Join an existing translation team or create your own and translate into the interface.
|
||||||
|
|
||||||
Your translations will be available in the next major release.
|
Your translations will be available in the next major release.
|
||||||
|
|
||||||
### Resources
|
### Resources
|
||||||
[Translator documentation](http://wiki.dolibarr.org/index.php/Developer_documentation)
|
[Translator documentation](http://wiki.dolibarr.org/index.php/Translator_documentation)
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
-------------
|
-------------
|
||||||
The project's documentation is maintained on the [Wiki](http://wiki.dolibarr.org/index.php).
|
The project's documentation is maintained on the [Wiki](http://wiki.dolibarr.org/index.php).
|
||||||
|
|
||||||
*You need to create an account before being able to edit.*
|
*Note*: to help prevent spam, you need to create an account before being able to edit.
|
||||||
|
|
||||||
|
|||||||
109
ChangeLog
109
ChangeLog
@ -2,7 +2,9 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
WARNING: Do not try to make any Dolibarr upgrade if you are running Mysql version 5.5.40.
|
WARNING:
|
||||||
|
|
||||||
|
Do not try to make any Dolibarr upgrade if you are running Mysql version 5.5.40.
|
||||||
Mysql version 5.5.40 has a very critical bug making your data beeing definitely lost.
|
Mysql version 5.5.40 has a very critical bug making your data beeing definitely lost.
|
||||||
You may also experience troubles with Mysql 5.5.41 with error "Lost connection" during migration.
|
You may also experience troubles with Mysql 5.5.41 with error "Lost connection" during migration.
|
||||||
Upgrading to any other version or any other database system is abolutely required BEFORE trying
|
Upgrading to any other version or any other database system is abolutely required BEFORE trying
|
||||||
@ -11,9 +13,89 @@ make a Dolibarr upgrade.
|
|||||||
|
|
||||||
***** ChangeLog for 3.9 compared to 3.8.* *****
|
***** ChangeLog for 3.9 compared to 3.8.* *****
|
||||||
|
|
||||||
WARNING: Following changes may create regression for some external modules, but were necessary to make
|
WARNING:
|
||||||
|
|
||||||
|
Following changes may create regression for some external modules, but were necessary to make
|
||||||
Dolibarr better:
|
Dolibarr better:
|
||||||
- Deprecated hidden option MAIN_USE_CUSTOM_TRANSLATION has been removed. Use MAIN_OVERWRITE_TRANS_xx_YY instead.
|
- Deprecated hidden option MAIN_USE_CUSTOM_TRANSLATION has been removed. Use table llx_overwrite_trans instead.
|
||||||
|
- Trigger LINECONTRACT_INSERT has been renamed into LINECONTRACT_CREATE to match common denomination.
|
||||||
|
- A lot hooks used into PDF generation were not correctly implemented. We had to fix this. The result si that
|
||||||
|
the following hook were set as hook of type "replace". This means if your module implement such hooks, it must
|
||||||
|
return 0 to execute standard code or 1 to replace standard code (value to output should be set into resPrints instead).
|
||||||
|
This is list of hooks modified:
|
||||||
|
'pdf_getlinenum', 'pdf_getlineref', 'pdf_getlineref_supplier', 'pdf_getlinevatrate', 'pdf_getlineupexcltax',
|
||||||
|
'pdf_getlineupwithtax', 'pdf_getlineqty', 'pdf_getlineqty_asked', 'pdf_getlineqty_shipped', 'pdf_getlineqty_keeptoship',
|
||||||
|
'pdf_getlineunit', 'pdf_getlineremisepercent', 'pdf_getlineprogress', 'pdf_getlinetotalexcltax', 'pdf_getlinetotalwithtax'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 3.8.1 compared to 3.8.0 *****
|
||||||
|
FIX: #3521 postgresql migration error
|
||||||
|
FIX: #3524
|
||||||
|
FIX: #3529
|
||||||
|
FIX: #3530
|
||||||
|
FIX: #3533
|
||||||
|
FIX: #3533 Load categories language
|
||||||
|
FIX: #3534
|
||||||
|
FIX: #3572 Impossible to attach project in order
|
||||||
|
FIX: #3599 Not saving legal form
|
||||||
|
FIX: #3606
|
||||||
|
FIX: #3607 Better categories setting and unsetting
|
||||||
|
FIX: #3628
|
||||||
|
FIX: #3630 - Wrong balance report when module salaries and donation disabled
|
||||||
|
FIX: Add a test to save life when ref of object (invoice ref, order ref, ...) was empty. The was no way to go back to a clean situation, even after vaidating again the object.
|
||||||
|
FIX: Admin fiche inter page do not take good action
|
||||||
|
FIX: Always use type send in parameters in showCategories method
|
||||||
|
FIX: avoid SQL error in getValueFrom common object when all params are not send
|
||||||
|
FIX: avoid SQL error when no sortfield send to method
|
||||||
|
FIX: bad link into project box
|
||||||
|
FIX: Bad title line in project view when using jmobile
|
||||||
|
FIX: Bad translation key for project "Overview"
|
||||||
|
FIX: Can create Proposal on close thridparty #3526
|
||||||
|
FIX: Can't change state on a contact
|
||||||
|
FIX: Can't change the admin with default setup
|
||||||
|
FIX: Can't delete thirdparty if there is some discounts
|
||||||
|
FIX: Can't reopen a canceled invoice.
|
||||||
|
FIX: Creation of tables or keys must not be done with a random order.
|
||||||
|
FIX: debian install when module mysqli is not installed.
|
||||||
|
FIX: Description of tags was mandatory in edit mode but not in create mode. Should not be mandatory.
|
||||||
|
FIX: display error on extrafields on ficheinter
|
||||||
|
FIX: Email selector contact must not include inactive contact
|
||||||
|
FIX: error in SQL due to a previous fix
|
||||||
|
FIX: Error retrieving customer prices
|
||||||
|
FIX: Event from ical stream should not be movable into calendar view
|
||||||
|
FIX: facturestat bad sql when customer view is limited
|
||||||
|
FIX: Filter on status of thirdparty list and bad encoding of url
|
||||||
|
FIX: icon into export profile may be not correctly output
|
||||||
|
FIX: Init into bad var
|
||||||
|
FIX: Link of project must be cickable if user has permission to read all projects FIX: Missing information into the alt of project picto
|
||||||
|
FIX: List of project for user that are restrited as sale repreentative to some thirdparties.
|
||||||
|
FIX: Mass Mailing activity don't display all status
|
||||||
|
FIX: Missing contracts into list in page of Refering objects of a thirdparty.
|
||||||
|
FIX: Missing menu entry for list of thirdparties when using auguria menu manager
|
||||||
|
FIX: Missing validate button if permission are not valid.
|
||||||
|
FIX: New adherent from, always redirect on entity
|
||||||
|
FIX: not closing CSS.
|
||||||
|
FIX: not responsive part for project page
|
||||||
|
FIX: Only are showing one object linked
|
||||||
|
FIX: order ref must not be translated
|
||||||
|
FIX: Payment form for paypal and paybox was not centered.
|
||||||
|
FIX: Pb into pagination scroll widget FIX: Style of previous-next card when using dolidroid
|
||||||
|
FIX: Regression on bad use of fk_account showing the bad bank account on PDF.
|
||||||
|
FIX: Removed warnings
|
||||||
|
FIX: remove twice same test
|
||||||
|
FIX: select of project using ajax autocomplete option
|
||||||
|
FIX: sortder field was missing so manually added values were moved to begin.
|
||||||
|
FIX: Syntax error in Debian Apache configuration
|
||||||
|
FIX: The admin flag is mising.
|
||||||
|
FIX: The filter on thirdparty prices should be visible if there is at least one thirdparty price.
|
||||||
|
FIX: Thirdparty is missing on card
|
||||||
|
FIX: update2.php test res befre assign it
|
||||||
|
FIX: When delete actioncomm also delete actioncomm_resources
|
||||||
|
FIX: when editing time spent, date of line suggested was a rubbish value
|
||||||
|
FIX: When filter with empty status, by default get canceled status (-1)
|
||||||
|
FIX: When update a member login for a member linked to a user, the login of user was not sync (not updated).
|
||||||
|
FIX: Wizard for restore does not show import command
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 3.8 compared to 3.7.* *****
|
***** ChangeLog for 3.8 compared to 3.7.* *****
|
||||||
@ -278,9 +360,11 @@ FIX send mail, copy sendto don't read the list of contact
|
|||||||
FIX Properly escape untrusted data to prevent HTML injection.
|
FIX Properly escape untrusted data to prevent HTML injection.
|
||||||
FIX send mail, copy sendto don't read the list of contact
|
FIX send mail, copy sendto don't read the list of contact
|
||||||
|
|
||||||
Path to save photos of products was moved in 3.7.0 to match path of other attached files. If you had loose
|
WARNING:
|
||||||
your photo on the photo tab of products, you can set the constant "PRODUCT_USE_OLD_PATH_FOR_PHOTO" to
|
|
||||||
restore old path.
|
Path to save photos of products was moved to match path of other attached files. If you had loose your photo
|
||||||
|
on the photo tab of products, you can set the constant "PRODUCT_USE_OLD_PATH_FOR_PHOTO" to 1 (home - setup - other)
|
||||||
|
to restore old path and get back working links without having to resubmit images.
|
||||||
|
|
||||||
WARNING:
|
WARNING:
|
||||||
|
|
||||||
@ -453,11 +537,14 @@ You may also experience troubles with Mysql 5.5.41 with error "Lost connection"
|
|||||||
Upgrading to any other version or database system is abolutely required BEFORE trying to
|
Upgrading to any other version or database system is abolutely required BEFORE trying to
|
||||||
make a Dolibarr upgrade.
|
make a Dolibarr upgrade.
|
||||||
|
|
||||||
WARNING: Following changes may create regression for some external modules, but was necessary to make
|
WARNING:
|
||||||
|
|
||||||
|
Following changes may create regression for some external modules, but was necessary to make
|
||||||
Dolibarr better:
|
Dolibarr better:
|
||||||
|
|
||||||
- Path to save photos of products was moved to match path of other attached files. If you had loose your photo
|
- Path to save photos of products was moved to match path of other attached files. If you had loose your photo
|
||||||
on the photo tab of products, you can set the constant "PRODUCT_USE_OLD_PATH_FOR_PHOTO" to restore old path.
|
on the photo tab of products, you can set the constant "PRODUCT_USE_OLD_PATH_FOR_PHOTO" to 1 (home - setup - other)
|
||||||
|
to restore old path and get back working links without having to resubmit images.
|
||||||
- If you can't see trips and expenses records, check that you have the new permission "read all
|
- If you can't see trips and expenses records, check that you have the new permission "read all
|
||||||
trips and expenses".
|
trips and expenses".
|
||||||
- Deprecated module "oscommerce" were removed.
|
- Deprecated module "oscommerce" were removed.
|
||||||
@ -472,6 +559,12 @@ Dolibarr better:
|
|||||||
warehouse module and your Point Of Sale module setup if you use one.
|
warehouse module and your Point Of Sale module setup if you use one.
|
||||||
- Replaced USER_UPDATE_SESSION trigger with an updateSession hook may break modules using it.
|
- Replaced USER_UPDATE_SESSION trigger with an updateSession hook may break modules using it.
|
||||||
|
|
||||||
|
***** ChangeLog for 3.6.5 compared to 3.6.4 *****
|
||||||
|
- Fix: [ bug #1776 ] Undefined $deliverycompany variable in pdf_build_address
|
||||||
|
- Fix: [ bug #1794 ] Error when cloning Proposal gives error in a malformed page
|
||||||
|
|
||||||
|
***** ChangeLog for 3.6.4 compared to 3.6.3 *****
|
||||||
|
- Fix: [ bug #2893 ] Dolibarr error when viewing an invoice after changing invoice mask
|
||||||
|
|
||||||
***** ChangeLog for 3.6.3 compared to 3.6.2 *****
|
***** ChangeLog for 3.6.3 compared to 3.6.2 *****
|
||||||
- Fix: ref_ext was not saved when recording a customer order from web service
|
- Fix: ref_ext was not saved when recording a customer order from web service
|
||||||
|
|||||||
30
README-FR.md
30
README-FR.md
@ -77,50 +77,56 @@ Voir fichier ChangeLog.
|
|||||||
|
|
||||||
## CE QUE DOLIBARR PEUT FAIRE
|
## CE QUE DOLIBARR PEUT FAIRE
|
||||||
|
|
||||||
Modules principaux:
|
### Modules principaux (tous optionnels):
|
||||||
|
|
||||||
- Annuaires des prospects et/ou client et/ou fournisseurs
|
- Annuaires des prospects et/ou client et/ou fournisseurs
|
||||||
- Gestion de catalogue de produits et services
|
- Gestion de catalogue de produits et services
|
||||||
- Gestion de stock
|
- Gestion des devis, propositions commerciales
|
||||||
|
- Gestion des commandes
|
||||||
|
- Gestion des factures clients/fournisseurs et paiements
|
||||||
|
- Gestion des virements bancaires SEPA
|
||||||
- Gestion des comptes bancaires
|
- Gestion des comptes bancaires
|
||||||
- Agenda partagé
|
- Agenda partagé
|
||||||
- Gestion des commandes
|
- Suivi des opportunités et/ou projets (suivi de rentabilité incluant les factures, notes de frais, temps consommé valorisé, ...)
|
||||||
- Gestion des devis, propositions commerciales
|
|
||||||
- Gestion des factures clients et fournisseurs
|
|
||||||
- Gestion de contrats de services
|
- Gestion de contrats de services
|
||||||
- Gestion des paiements
|
- Gestion de stock
|
||||||
- Gestion des virements bancaires
|
|
||||||
- Gestion des expéditions
|
- Gestion des expéditions
|
||||||
- GED (Gestion Electronique de Documents)
|
- GED (Gestion Electronique de Documents)
|
||||||
- EMailings de masse
|
- EMailings de masse
|
||||||
- Réalisation de sondages
|
- Réalisation de sondages
|
||||||
- Point de vente/Caisse enregistreuse
|
- Point de vente/Caisse enregistreuse
|
||||||
|
- …
|
||||||
|
|
||||||
|
### Autres modules:
|
||||||
|
|
||||||
Autres modules:
|
|
||||||
- Gestion de marque-pages
|
- Gestion de marque-pages
|
||||||
- Gestion des promesses de dons
|
- 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 de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM)
|
||||||
- Rapports
|
- Rapports
|
||||||
- Imports/Exports des données
|
- Imports/Exports des données
|
||||||
- Connectivité LDAP
|
- 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...)
|
- De nombreuses autres fonctionnalités issues de modules officiels ou non (AWStats, Bittorrent, Gravatar, Google, Webcalendar...)
|
||||||
|
- …
|
||||||
|
|
||||||
|
### Divers:
|
||||||
|
|
||||||
Divers:
|
|
||||||
- Application multi-utilisateurs avec différents niveaux de permissions par module.
|
- Application multi-utilisateurs avec différents niveaux de permissions par module.
|
||||||
|
- Peux être multi-société par ajout du module externe multi-société.
|
||||||
|
- Peux-être multi-devise par ajout du module externe multi-devise.
|
||||||
- Plusieurs gestionnaires de menus (possibilité de différencier les menus pour les utilisateurs internes ou externes comme les clients ou fournisseurs).
|
- Plusieurs gestionnaires de menus (possibilité de différencier les menus pour les utilisateurs internes ou externes comme les clients ou fournisseurs).
|
||||||
- Application simple à utiliser.
|
- Application simple à utiliser.
|
||||||
- Plusieurs thèmes visuels.
|
- Plusieurs thèmes visuels.
|
||||||
- Code simple et facilement personnalisable.
|
- Code simple et facilement personnalisable.
|
||||||
- Requiert PHP et Mysql ou Postgresql (Voir versions exactes sur http://wiki.dolibarr.org/index.php/Prérequis).
|
- Requiert PHP et Mysql ou Postgresql (Voir versions exactes sur http://wiki.dolibarr.org/index.php/Prérequis).
|
||||||
- Compatible avec toutes les offres Cloud du marché respectant les prérequis MySQL et PHP ou Postgresql.
|
- Compatible avec toutes les offres Cloud du marché respectant les prérequis MySQL et PHP ou Postgresql.
|
||||||
|
- Export PDF de tous les éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
|
||||||
|
|
||||||
|
|
||||||
## CE QUE DOLIBARR NE PEUT PAS FAIRE (TACHES A FAIRE)
|
## CE QUE DOLIBARR NE PEUT PAS FAIRE (TACHES A FAIRE)
|
||||||
|
|
||||||
Voici un liste de fonctionnalites pas encore gérées par Dolibarr:
|
Voici un liste de fonctionnalites pas encore gérées par Dolibarr:
|
||||||
- Pas de compta analytique double-partie (uniquement gestion de trésorerie).
|
- Pas encore de compta analytique double-partie (uniquement gestion de trésorerie).
|
||||||
- Dolibarr ne gère qu'une seule monnaie à la fois (mono-devise).
|
- 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 contient pas de module de Gestion de la paie.
|
- Dolibarr ne contient pas de module de Gestion de la paie.
|
||||||
- Les tâches du module de gestion de projets n'ont pas de dépendance entre elle.
|
- Les tâches du module de gestion de projets n'ont pas de dépendance entre elle.
|
||||||
- Dolibarr ne contient pas de Webmail.
|
- Dolibarr ne contient pas de Webmail.
|
||||||
|
|||||||
57
README.md
57
README.md
@ -69,39 +69,22 @@ See the [ChangeLog](ChangeLog) file.
|
|||||||
|
|
||||||
## FEATURES
|
## FEATURES
|
||||||
|
|
||||||
### General features
|
### Main modules (all optional)
|
||||||
- Users and groups with finely grained rights
|
|
||||||
- Localization in most major languages
|
|
||||||
- Very user friendly and easy to use
|
|
||||||
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several 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 one)
|
|
||||||
- Works with PHP 5.3+ and MySQL 4.1+ or PostgreSQL 8.1. (See requirements on the [Wiki](http://wiki.dolibarr.org/index.php/Prerequisite))
|
|
||||||
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
|
|
||||||
- An easy to understand, maintain and code interfaces with your own information system (PHP with no heavy framework; trigger and hook architecture)
|
|
||||||
- Support for country specific features:
|
|
||||||
- Spanish Tax RE and ISPF
|
|
||||||
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
|
|
||||||
- Canadian double taxes (federal/province) and other countries using cumulative VAT
|
|
||||||
- Tunisian tax stamp
|
|
||||||
- Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
|
|
||||||
- ...
|
|
||||||
|
|
||||||
### Main modules
|
|
||||||
|
|
||||||
- Customers, Prospects and/or Suppliers directory
|
- Customers, Prospects and/or Suppliers directory
|
||||||
- Products and/or Services catalog
|
- Products and/or Services catalog
|
||||||
- Bank accounts management
|
|
||||||
- Customer and Supplier Orders management
|
|
||||||
- Commercial proposals management
|
- Commercial proposals management
|
||||||
- Contracts management
|
- Customer and Supplier Orders management
|
||||||
- Invoices management
|
- Invoices and payment management
|
||||||
|
- Standing orders management (European SEPA)
|
||||||
|
- Bank accounts management
|
||||||
|
- Shared calendar
|
||||||
|
- Opportunities and/or project management (following project benefit including invoices, expense reports, time spent, ...)
|
||||||
- Projects management
|
- Projects management
|
||||||
- Events management
|
- Contracts management
|
||||||
- Payments management
|
|
||||||
- Standing orders management
|
|
||||||
- Stock management
|
- Stock management
|
||||||
- Shipping management
|
- Shipping management
|
||||||
- Interventions management
|
- Interventions management
|
||||||
- PDF or ODT generation for invoice, proposals, orders...
|
|
||||||
- Agenda with ical and vcal export for third party tools integration
|
- Agenda with ical and vcal export for third party tools integration
|
||||||
- Electronic Document Management (EDM)
|
- Electronic Document Management (EDM)
|
||||||
- Foundations members management
|
- Foundations members management
|
||||||
@ -127,6 +110,25 @@ See the [ChangeLog](ChangeLog) file.
|
|||||||
- Payment platforms integration (PayBox, PayPal)
|
- Payment platforms integration (PayBox, PayPal)
|
||||||
- …
|
- …
|
||||||
|
|
||||||
|
### Other general features
|
||||||
|
- Multi-Users and groups with finely grained rights
|
||||||
|
- Localization in most major languages
|
||||||
|
- Can manage several companies by adding external module multi-company.
|
||||||
|
- Can manage several currencies by adding external module multi-currency.
|
||||||
|
- Very user friendly and easy to use
|
||||||
|
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several 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 one)
|
||||||
|
- Works with PHP 5.3+ and MySQL 4.1+ or PostgreSQL 8.1. (See requirements on the [Wiki](http://wiki.dolibarr.org/index.php/Prerequisite))
|
||||||
|
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
|
||||||
|
- An easy to understand, maintain and code interfaces with your own information system (PHP with no heavy framework; trigger and hook architecture)
|
||||||
|
- Support for country specific features:
|
||||||
|
- Spanish Tax RE and ISPF
|
||||||
|
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
|
||||||
|
- Canadian double taxes (federal/province) and other countries using cumulative VAT
|
||||||
|
- Tunisian tax stamp
|
||||||
|
- Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
|
||||||
|
- PDF or ODT generation for invoice, proposals, orders...
|
||||||
|
- …
|
||||||
|
|
||||||
### Extending
|
### Extending
|
||||||
|
|
||||||
Dolibarr can be extended with a lot of other external modules from third party developers available at the [DoliStore](http://www.dolistore.com).
|
Dolibarr can be extended with a lot of other external modules from third party developers available at the [DoliStore](http://www.dolistore.com).
|
||||||
@ -135,10 +137,7 @@ Dolibarr can be extended with a lot of other external modules from third party d
|
|||||||
|
|
||||||
These are features that Dolibarr does **not** yet fully support:
|
These are features that Dolibarr does **not** yet fully support:
|
||||||
|
|
||||||
- Double-entry bookkeeping (only bank and treasury management)
|
- Double-entry bookkeeping yet (only bank and treasury management)
|
||||||
- Multiple currencies
|
|
||||||
- Multiple companies
|
|
||||||
If you want to manage several companies or foundations, you must install the software several times (on same server or not) or use the MultiCompany addon module that allows to manage several companies in one Dolibarr instance (one database but with a logical isolation of datas)
|
|
||||||
- Tasks dependencies in projects
|
- Tasks dependencies in projects
|
||||||
- Payroll module
|
- Payroll module
|
||||||
- Webmail
|
- Webmail
|
||||||
|
|||||||
@ -8,7 +8,9 @@ This files describe steps made by Dolibarr packaging team to make a
|
|||||||
beta version of Dolibarr, step by step.
|
beta version of Dolibarr, step by step.
|
||||||
|
|
||||||
- Check all files are commited.
|
- Check all files are commited.
|
||||||
- Update version/info in ChangeLog. To generate a changelog, you can do "git log `git merge-base 3.7.0 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
- Update version/info in ChangeLog.
|
||||||
|
To generate a changelog of a major new version x.y.0, you can do "cd ~/git/dolibarr_x.y; git log `git merge-base x-1.y-1.0 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||||
|
To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log `git merge-base x.y.z-1 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||||
- Update version number with x.y.z-w in htdocs/filefunc.inc.php
|
- Update version number with x.y.z-w in htdocs/filefunc.inc.php
|
||||||
- Commit all changes.
|
- Commit all changes.
|
||||||
|
|
||||||
@ -28,7 +30,9 @@ This files describe steps made by Dolibarr packaging team to make a
|
|||||||
complete release of Dolibarr, step by step.
|
complete release of Dolibarr, step by step.
|
||||||
|
|
||||||
- Check all files are commited.
|
- Check all files are commited.
|
||||||
- Update version/info in ChangeLog. To generate a changelog, you can do "git log `git merge-base 3.7.0 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
- Update version/info in ChangeLog.
|
||||||
|
To generate a changelog of a major new version x.y.0, you can do "cd ~/git/dolibarr_x.y; git log `git merge-base x-1.y-1.0 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||||
|
To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log `git merge-base x.y.z-1 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||||
- Update version number with x.y.z in htdocs/filefunc.inc.php
|
- Update version number with x.y.z in htdocs/filefunc.inc.php
|
||||||
- Commit all changes.
|
- Commit all changes.
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ return "Regis Houssin";
|
|||||||
# script_dolibarr_versions()
|
# script_dolibarr_versions()
|
||||||
sub script_dolibarr_versions
|
sub script_dolibarr_versions
|
||||||
{
|
{
|
||||||
return ( "3.7.2", "3.6.3", "3.5.6" );
|
return ( "3.8.1", "3.7.1", "3.6.4", "3.5.7" );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub script_dolibarr_category
|
sub script_dolibarr_category
|
||||||
@ -163,7 +163,7 @@ return ("tar", "gunzip");
|
|||||||
}
|
}
|
||||||
|
|
||||||
# script_dolibarr_install(&domain, version, &opts, &files, &upgrade-info)
|
# script_dolibarr_install(&domain, version, &opts, &files, &upgrade-info)
|
||||||
# Actually installs joomla, and returns either 1 and an informational
|
# Actually installs dolibarr, and returns either 1 and an informational
|
||||||
# message, or 0 and an error
|
# message, or 0 and an error
|
||||||
sub script_dolibarr_install
|
sub script_dolibarr_install
|
||||||
{
|
{
|
||||||
@ -206,6 +206,9 @@ $pgcharset = $tmpl->{'postgres_encoding'};
|
|||||||
$charset = $dbtype eq "mysql" ? $mycharset : $pgcharset;
|
$charset = $dbtype eq "mysql" ? $mycharset : $pgcharset;
|
||||||
$collate = $dbtype eq "mysql" ? $mycollate : "C";
|
$collate = $dbtype eq "mysql" ? $mycollate : "C";
|
||||||
|
|
||||||
|
# Install filename
|
||||||
|
local $step = $version >= 3.8 ? "step" : "etape";
|
||||||
|
|
||||||
$path = &script_path_url($d, $opts);
|
$path = &script_path_url($d, $opts);
|
||||||
if ($path =~ /^https:/ || $d->{'ssl'}) {
|
if ($path =~ /^https:/ || $d->{'ssl'}) {
|
||||||
$url = "https://$d->{'dom'}";
|
$url = "https://$d->{'dom'}";
|
||||||
@ -224,6 +227,10 @@ if (!$upgrade) {
|
|||||||
&set_permissions_as_domain_user($d, 0666, $cfile);
|
&set_permissions_as_domain_user($d, 0666, $cfile);
|
||||||
&run_as_domain_user($d, "mkdir ".quotemeta($docdir));
|
&run_as_domain_user($d, "mkdir ".quotemeta($docdir));
|
||||||
&set_permissions_as_domain_user($d, 0777, $docdir);
|
&set_permissions_as_domain_user($d, 0777, $docdir);
|
||||||
|
if (!$version >= 3.7.2) {
|
||||||
|
&run_as_domain_user($d, "mkdir ".quotemeta($altdir));
|
||||||
|
&set_permissions_as_domain_user($d, 0777, $altdir);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# Preserve old config file, documents and custom directory
|
# Preserve old config file, documents and custom directory
|
||||||
@ -259,7 +266,7 @@ if ($upgrade) {
|
|||||||
[ "versionfrom", $upgrade->{'version'} ],
|
[ "versionfrom", $upgrade->{'version'} ],
|
||||||
[ "versionto", $ver ],
|
[ "versionto", $ver ],
|
||||||
);
|
);
|
||||||
local $err = &call_dolibarr_wizard_page(\@params, "step5", $d, $opts);
|
local $err = &call_dolibarr_wizard_page(\@params, $step."5", $d, $opts);
|
||||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||||
|
|
||||||
# Remove the installation directory.
|
# Remove the installation directory.
|
||||||
@ -282,15 +289,15 @@ else {
|
|||||||
[ "main_force_https", $opts->{'forcehttps'} ],
|
[ "main_force_https", $opts->{'forcehttps'} ],
|
||||||
[ "dolibarr_main_db_character_set", $charset ],
|
[ "dolibarr_main_db_character_set", $charset ],
|
||||||
[ "dolibarr_main_db_collation", $collate ],
|
[ "dolibarr_main_db_collation", $collate ],
|
||||||
[ "usealternaterootdir", "1" ],
|
[ "main_use_alt_dir", "1" ],
|
||||||
[ "main_alt_dir_name", "custom" ],
|
[ "main_alt_dir_name", "custom" ],
|
||||||
);
|
);
|
||||||
local $err = &call_dolibarr_wizard_page(\@params, "step1", $d, $opts);
|
local $err = &call_dolibarr_wizard_page(\@params, $step."1", $d, $opts);
|
||||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||||
|
|
||||||
# Second page (Populate database)
|
# Second page (Populate database)
|
||||||
local @params = ( [ "action", "set" ] );
|
local @params = ( [ "action", "set" ] );
|
||||||
local $err = &call_dolibarr_wizard_page(\@params, "step2", $d, $opts);
|
local $err = &call_dolibarr_wizard_page(\@params, $step."2", $d, $opts);
|
||||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||||
|
|
||||||
# Third page (Add administrator account)
|
# Third page (Add administrator account)
|
||||||
@ -299,7 +306,7 @@ else {
|
|||||||
[ "pass", $dompass ],
|
[ "pass", $dompass ],
|
||||||
[ "pass_verif", $dompass ],
|
[ "pass_verif", $dompass ],
|
||||||
);
|
);
|
||||||
local $err = &call_dolibarr_wizard_page(\@params, "step5", $d, $opts);
|
local $err = &call_dolibarr_wizard_page(\@params, $step."5", $d, $opts);
|
||||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||||
|
|
||||||
# Remove the installation directory and protect config file.
|
# Remove the installation directory and protect config file.
|
||||||
@ -324,14 +331,10 @@ local ($params, $page, $d, $opts) = @_;
|
|||||||
local $params = join("&", map { $_->[0]."=".&urlize($_->[1]) } @$params );
|
local $params = join("&", map { $_->[0]."=".&urlize($_->[1]) } @$params );
|
||||||
local $ipage = $opts->{'path'}."/install/".$page.".php";
|
local $ipage = $opts->{'path'}."/install/".$page.".php";
|
||||||
local ($iout, $ierror);
|
local ($iout, $ierror);
|
||||||
|
|
||||||
&post_http_connection($d, $ipage, $params, \$iout, \$ierror);
|
&post_http_connection($d, $ipage, $params, \$iout, \$ierror);
|
||||||
print STDERR $iout;
|
|
||||||
|
|
||||||
if ($ierror) {
|
if ($ierror) {
|
||||||
return $ierror;
|
return $ierror;
|
||||||
}
|
}
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -347,8 +350,8 @@ local $derr = &delete_script_install_directory($d, $opts);
|
|||||||
return (0, $derr) if ($derr);
|
return (0, $derr) if ($derr);
|
||||||
|
|
||||||
# Remove all llx_ tables from the database
|
# Remove all llx_ tables from the database
|
||||||
# 4 times because of constraints
|
# 10 times because of constraints
|
||||||
for(my $i=0; $i<4; $i++) {
|
for(my $i=0; $i<10; $i++) {
|
||||||
&cleanup_script_database($d, $opts->{'db'}, "llx_");
|
&cleanup_script_database($d, $opts->{'db'}, "llx_");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -381,9 +384,10 @@ sub script_dolibarr_check_latest
|
|||||||
{
|
{
|
||||||
local ($ver) = @_;
|
local ($ver) = @_;
|
||||||
local @vers = &osdn_package_versions("dolibarr",
|
local @vers = &osdn_package_versions("dolibarr",
|
||||||
$ver >= 3.2 ? "dolibarr\\-(3\\.[0-9\\.]+)\\.tgz" :
|
$ver >= 3.8 ? "dolibarr\\-(3\\.[0-9\\.]+)\\.tgz" :
|
||||||
$ver >= 3.1 ? "dolibarr\\-(3\\.1\\.[0-9\\.]+)\\.tgz" :
|
$ver >= 3.7 ? "dolibarr\\-(3\\.7\\.[0-9\\.]+)\\.tgz" :
|
||||||
$ver >= 3 ? "dolibarr\\-(3\\.0\\.[0-9\\.]+)\\.tgz" :
|
$ver >= 3.6 ? "dolibarr\\-(3\\.6\\.[0-9\\.]+)\\.tgz" :
|
||||||
|
$ver >= 3.5 ? "dolibarr\\-(3\\.5\\.[0-9\\.]+)\\.tgz" :
|
||||||
$ver >= 2.9 ? "dolibarr\\-(2\\.9\\.[0-9\\.]+)\\.tgz" :
|
$ver >= 2.9 ? "dolibarr\\-(2\\.9\\.[0-9\\.]+)\\.tgz" :
|
||||||
"dolibarr\\-(2\\.8\\.[0-9\\.]+)\\.tgz");
|
"dolibarr\\-(2\\.8\\.[0-9\\.]+)\\.tgz");
|
||||||
return "Failed to find versions" if (!@vers);
|
return "Failed to find versions" if (!@vers);
|
||||||
|
|||||||
2058
dev/cliparts/commons.svg
Normal file
2058
dev/cliparts/commons.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 65 KiB |
@ -231,7 +231,7 @@ class Skeleton_Class extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($sortfield)) {
|
if (!empty($sortfield)) {
|
||||||
$sql .= ' ORDER BY ' . $sortfield . ' ' . $sortorder;
|
$sql .= $this->db->order($sortfield,$sortorder);
|
||||||
}
|
}
|
||||||
if (!empty($limit)) {
|
if (!empty($limit)) {
|
||||||
$sql .= ' ' . $this->db->plimit($limit + 1, $offset);
|
$sql .= ' ' . $this->db->plimit($limit + 1, $offset);
|
||||||
|
|||||||
@ -282,7 +282,7 @@ if ($action == 'list' || (empty($id) && $action != 'create'))
|
|||||||
|
|
||||||
if (! empty($moreforfilter))
|
if (! empty($moreforfilter))
|
||||||
{
|
{
|
||||||
print '<div class="liste_titre">';
|
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||||
print $moreforfilter;
|
print $moreforfilter;
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||||
@ -290,7 +290,7 @@ if ($action == 'list' || (empty($id) && $action != 'create'))
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<table class="noborder">'."\n";
|
print '<table class="liste">'."\n";
|
||||||
|
|
||||||
// Fields title
|
// Fields title
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|||||||
@ -76,7 +76,7 @@ if ($action == 'disable') {
|
|||||||
|
|
||||||
$action = 'update';
|
$action = 'update';
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessage($accounting->error, 'errors');
|
setEventMessages($accounting->error, $accounting->errors, 'errors');
|
||||||
}
|
}
|
||||||
} else if ($action == 'enable') {
|
} else if ($action == 'enable') {
|
||||||
if ($accounting->fetch($id)) {
|
if ($accounting->fetch($id)) {
|
||||||
@ -84,7 +84,7 @@ if ($action == 'disable') {
|
|||||||
}
|
}
|
||||||
$action = 'update';
|
$action = 'update';
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessage($accounting->error, 'errors');
|
setEventMessages($accounting->error, $accounting->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -125,7 +125,7 @@ else if ($action == 'delete')
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessage($accounting->error, 'errors');
|
setEventMessages($accounting->error, $accounting->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -100,9 +100,9 @@ if ($action == 'update') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (! $error) {
|
if (! $error) {
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
} else {
|
} else {
|
||||||
setEventMessage($langs->trans("Error"), 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -66,7 +66,7 @@ if ($action == 'confirm_delete' && $confirm == "yes")
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($object->error, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,12 +84,12 @@ else if ($action == 'add')
|
|||||||
|
|
||||||
if (empty($object->date_start) && empty($object->date_end))
|
if (empty($object->date_start) && empty($object->date_end))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")), 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if (empty($object->label))
|
if (empty($object->label))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Label")), 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ else if ($action == 'add')
|
|||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
|
|
||||||
setEventMessage($object->error, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
$action='create';
|
$action='create';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -147,7 +147,7 @@ else if ($action == 'update')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($object->error, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -76,14 +76,14 @@ if ($_POST["action"] == 'import') {
|
|||||||
|
|
||||||
$result = $accounting->create($user);
|
$result = $accounting->create($user);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
setEventMessage($langs->trans("AccountingAccountAdd"), 'mesgs');
|
setEventMessages($langs->trans("AccountingAccountAdd"), null, 'mesgs');
|
||||||
} else {
|
} else {
|
||||||
setEventMessage($accounting->error, 'errors');
|
setEventMessages($accounting->error, $accounting->errors, 'errors');
|
||||||
}
|
}
|
||||||
$cpt ++;
|
$cpt ++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setEventMessage($langs->trans('AccountPlanNotFoundCheckSetting'), 'errors');
|
setEventMessages($langs->trans('AccountPlanNotFoundCheckSetting'), null, 'errors');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
print '<div><font color="red">' . $langs->trans("AnyLineImport") . '</font></div>';
|
print '<div><font color="red">' . $langs->trans("AnyLineImport") . '</font></div>';
|
||||||
|
|||||||
@ -111,11 +111,11 @@ if ($action == 'update')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,9 +126,9 @@ if ($action == 'setlistsorttodo') {
|
|||||||
$error ++;
|
$error ++;
|
||||||
|
|
||||||
if (! $error) {
|
if (! $error) {
|
||||||
setEventMessage($langs->trans("SetupSaved"), 'mesgs');
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
} else {
|
} else {
|
||||||
setEventMessage($langs->trans("Error"), 'mesgs');
|
setEventMessages($langs->trans("Error"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,9 +138,9 @@ if ($action == 'setlistsortdone') {
|
|||||||
if (! $res > 0)
|
if (! $res > 0)
|
||||||
$error ++;
|
$error ++;
|
||||||
if (! $error) {
|
if (! $error) {
|
||||||
setEventMessage($langs->trans("SetupSaved"), 'mesgs');
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
} else {
|
} else {
|
||||||
setEventMessage($langs->trans("Error"), 'mesgs');
|
setEventMessages($langs->trans("Error"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -68,9 +68,9 @@ if ($action == 'update') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (! $error) {
|
if (! $error) {
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
} else {
|
} else {
|
||||||
setEventMessage($langs->trans("Error"), 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -116,7 +116,7 @@ if ($action == 'update') {
|
|||||||
|
|
||||||
$result=$accounting->fetch($accounting_account_id,null,1);
|
$result=$accounting->fetch($accounting_account_id,null,1);
|
||||||
if ($result<0) {
|
if ($result<0) {
|
||||||
//setEventMessage(null, $accounting->errors,'errors');
|
//setEventMessages(null, $accounting->errors, 'errors');
|
||||||
$msg .= '<div><font color="red">' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Product") . ' ' . $productid . ' ' . $langs->trans("NotVentilatedinAccount") . ' : id=' . $accounting_account_id . '<br/> <pre>' . $sql . '</pre></font></div>';
|
$msg .= '<div><font color="red">' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Product") . ' ' . $productid . ' ' . $langs->trans("NotVentilatedinAccount") . ' : id=' . $accounting_account_id . '<br/> <pre>' . $sql . '</pre></font></div>';
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|||||||
@ -51,8 +51,8 @@ if ($action == "confirm_update") {
|
|||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
if ((intval($debit) != 0) && (intval($credit) != 0)) {
|
if ((floatval($debit)!=0.0) && (floatval($credit)!=0.0)) {
|
||||||
setEventMessage($langs->trans('ErrorDebitCredit'), 'errors');
|
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
|
||||||
$error ++;
|
$error ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ if ($action == "confirm_update") {
|
|||||||
|
|
||||||
$result = $book->fetch($id);
|
$result = $book->fetch($id);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessage($book->errors, 'errors');
|
setEventMessages($book->error, $book->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
$book->numero_compte = $numero_compte;
|
$book->numero_compte = $numero_compte;
|
||||||
$book->code_tiers = $code_tiers;
|
$book->code_tiers = $code_tiers;
|
||||||
@ -69,20 +69,20 @@ if ($action == "confirm_update") {
|
|||||||
$book->debit = $debit;
|
$book->debit = $debit;
|
||||||
$book->credit = $credit;
|
$book->credit = $credit;
|
||||||
|
|
||||||
if (! empty($debit)) {
|
if (floatval($debit)!=0.0) {
|
||||||
$book->montant = $debit;
|
$book->montant = $debit;
|
||||||
$book->sens = 'D';
|
$book->sens = 'D';
|
||||||
}
|
}
|
||||||
if (! empty($credit)) {
|
if (floatval($credit)!=0.0) {
|
||||||
$book->montant = $credit;
|
$book->montant = $credit;
|
||||||
$book->sens = 'C';
|
$book->sens = 'C';
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $book->update();
|
$result = $book->update();
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessage($book->errors, 'errors');
|
setEventMessages($book->error, $book->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
setEventMessage($langs->trans('Saved'), 'mesgs');
|
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -93,7 +93,7 @@ else if ($action == "add") {
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
if ((intval($debit) != 0) && (intval($credit) != 0)) {
|
if ((intval($debit) != 0) && (intval($credit) != 0)) {
|
||||||
setEventMessage($langs->trans('ErrorDebitCredit'), 'errors');
|
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
|
||||||
$error ++;
|
$error ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,9 +124,9 @@ else if ($action == "add") {
|
|||||||
|
|
||||||
$result = $book->create_std($user);
|
$result = $book->create_std($user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessage($book->errors, 'errors');
|
setEventMessages($book->error, $book->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
setEventMessage($langs->trans('Saved'), 'mesgs');
|
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -140,11 +140,11 @@ else if ($action == "confirm_delete") {
|
|||||||
$piece_num = $book->piece_num;
|
$piece_num = $book->piece_num;
|
||||||
|
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessage($book->errors, 'errors');
|
setEventMessages($book->error, $book->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
$result = $book->delete($user);
|
$result = $book->delete($user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessage($book->errors, 'errors');
|
setEventMessages($book->error, $book->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$action = '';
|
$action = '';
|
||||||
@ -168,9 +168,9 @@ else if ($action == "confirm_create") {
|
|||||||
|
|
||||||
$result = $book->create_std($user);
|
$result = $book->create_std($user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessage($book->errors, 'errors');
|
setEventMessages($book->error, $book->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
setEventMessage($langs->trans('Saved'), 'mesgs');
|
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||||
$action = '';
|
$action = '';
|
||||||
$piece_num = $book->piece_num;
|
$piece_num = $book->piece_num;
|
||||||
}
|
}
|
||||||
@ -246,7 +246,7 @@ if ($action == 'create') {
|
|||||||
$book = new BookKeeping($db);
|
$book = new BookKeeping($db);
|
||||||
$result = $book->fetch_per_mvt($piece_num);
|
$result = $book->fetch_per_mvt($piece_num);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessage($book->errors, 'errors');
|
setEventMessages($book->error, $book->errors, 'errors');
|
||||||
}
|
}
|
||||||
if (! empty($book->piece_num)) {
|
if (! empty($book->piece_num)) {
|
||||||
|
|
||||||
@ -277,7 +277,7 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
$result = $book->fetch_all_per_mvt($piece_num);
|
$result = $book->fetch_all_per_mvt($piece_num);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessage($book->errors, 'errors');
|
setEventMessages($book->error, $book->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("ListeMvts"));
|
print load_fiche_titre($langs->trans("ListeMvts"));
|
||||||
@ -372,4 +372,4 @@ if ($action == 'create') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -74,7 +74,7 @@ if ($action == 'delbookkeeping') {
|
|||||||
$result = $object->delete_by_importkey($import_key);
|
$result = $object->delete_by_importkey($import_key);
|
||||||
Header("Location: list.php");
|
Header("Location: list.php");
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessage($object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // Export
|
} // Export
|
||||||
@ -86,7 +86,7 @@ else if ($action == 'export_csv') {
|
|||||||
$object = new BookKeeping($db);
|
$object = new BookKeeping($db);
|
||||||
$result = $object->export_bookkeping('ebp');
|
$result = $object->export_bookkeping('ebp');
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessage($object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ( $object->linesexport as $line ) {
|
foreach ( $object->linesexport as $line ) {
|
||||||
|
|||||||
@ -54,7 +54,7 @@ if ($action == 'ventil' && $user->rights->accounting->ventilation->dispatch) {
|
|||||||
dol_syslog("/accounting/customer/card.php sql=" . $sql, LOG_DEBUG);
|
dol_syslog("/accounting/customer/card.php sql=" . $sql, LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if (! $resql) {
|
if (! $resql) {
|
||||||
setEventMessage($db->lasterror(), 'errors');
|
setEventMessages($db->lasterror(), null, 'errors');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
header("Location: ./lines.php");
|
header("Location: ./lines.php");
|
||||||
|
|||||||
@ -83,10 +83,10 @@ if ($action == 'validatehistory') {
|
|||||||
if (! $resql1) {
|
if (! $resql1) {
|
||||||
$error ++;
|
$error ++;
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($db->lasterror(), 'errors');
|
setEventMessages($db->lasterror(), null, 'errors');
|
||||||
} else {
|
} else {
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans('Dispatched'), 'mesgs');
|
setEventMessages($langs->trans('Dispatched'), null, 'mesgs');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -346,4 +346,4 @@ print "</table>\n";
|
|||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -109,14 +109,14 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
|
|||||||
$resql1 = $db->query($sql1);
|
$resql1 = $db->query($sql1);
|
||||||
if (! $resql1) {
|
if (! $resql1) {
|
||||||
$error ++;
|
$error ++;
|
||||||
setEventMessage($db->lasterror(), 'errors');
|
setEventMessages($db->lasterror(), null, 'errors');
|
||||||
}
|
}
|
||||||
if (! $error) {
|
if (! $error) {
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans('Save'), 'mesgs');
|
setEventMessages($langs->trans('Save'), null, 'mesgs');
|
||||||
} else {
|
} else {
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($db->lasterror(), 'errors');
|
setEventMessages($db->lasterror(), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,6 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/don/class/paymentdonation.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||||
@ -120,6 +121,7 @@ $paymentsupplierstatic = new PaiementFourn($db);
|
|||||||
$societestatic = new Societe($db);
|
$societestatic = new Societe($db);
|
||||||
$userstatic = new User($db);
|
$userstatic = new User($db);
|
||||||
$chargestatic = new ChargeSociales($db);
|
$chargestatic = new ChargeSociales($db);
|
||||||
|
$paymentdonstatic = new PaymentDonation($db);
|
||||||
$paymentvatstatic = new TVA($db);
|
$paymentvatstatic = new TVA($db);
|
||||||
$paymentsalstatic = new PaymentSalary($db);
|
$paymentsalstatic = new PaymentSalary($db);
|
||||||
|
|
||||||
@ -133,7 +135,8 @@ if ($result) {
|
|||||||
$cptcli = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef"));
|
$cptcli = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef"));
|
||||||
$accountancy_account_salary = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : $langs->trans("CodeNotDef"));
|
$accountancy_account_salary = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : $langs->trans("CodeNotDef"));
|
||||||
$accountancy_account_pay_vat = (! empty($conf->global->ACCOUNTING_VAT_PAY_ACCOUNT) ? $conf->global->ACCOUNTING_VAT_PAY_ACCOUNT : $langs->trans("CodeNotDef"));
|
$accountancy_account_pay_vat = (! empty($conf->global->ACCOUNTING_VAT_PAY_ACCOUNT) ? $conf->global->ACCOUNTING_VAT_PAY_ACCOUNT : $langs->trans("CodeNotDef"));
|
||||||
|
$accountancy_account_pay_donation = (! empty($conf->global->DONATION_ACCOUNTINGACCOUNT) ? $conf->global->DONATION_ACCOUNTINGACCOUNT : $langs->trans("CodeNotDef"));
|
||||||
|
|
||||||
$tabpay = array ();
|
$tabpay = array ();
|
||||||
$tabbq = array ();
|
$tabbq = array ();
|
||||||
$tabtp = array ();
|
$tabtp = array ();
|
||||||
@ -174,95 +177,100 @@ if ($result) {
|
|||||||
// get_url may return -1 which is not traversable
|
// get_url may return -1 which is not traversable
|
||||||
if (is_array($links))
|
if (is_array($links))
|
||||||
{
|
{
|
||||||
|
foreach ( $links as $key => $val )
|
||||||
foreach ( $links as $key => $val )
|
{
|
||||||
{
|
$tabtype[$obj->rowid] = $links[$key]['type'];
|
||||||
$tabtype[$obj->rowid] = $links[$key]['type'];
|
|
||||||
|
|
||||||
if ($links[$key]['type'] == 'payment')
|
if ($links[$key]['type'] == 'payment')
|
||||||
{
|
|
||||||
$paymentstatic->id = $links[$key]['url_id'];
|
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2);
|
|
||||||
}
|
|
||||||
else if ($links[$key]['type'] == 'payment_supplier')
|
|
||||||
{
|
|
||||||
$paymentsupplierstatic->id = $links[$key]['url_id'];
|
|
||||||
$paymentsupplierstatic->ref = $links[$key]['url_id'];
|
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2);
|
|
||||||
}
|
|
||||||
else if ($links[$key]['type'] == 'company')
|
|
||||||
{
|
|
||||||
$societestatic->id = $links[$key]['url_id'];
|
|
||||||
$societestatic->name = $links[$key]['label'];
|
|
||||||
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
|
|
||||||
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
|
||||||
}
|
|
||||||
else if ($links[$key]['type'] == 'user')
|
|
||||||
{
|
|
||||||
$userstatic->id = $links[$key]['url_id'];
|
|
||||||
$userstatic->name = $links[$key]['label'];
|
|
||||||
$tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30);
|
|
||||||
// $tabtp[$obj->rowid][$compta_user] += $obj->amount;
|
|
||||||
}
|
|
||||||
else if ($links[$key]['type'] == 'sc')
|
|
||||||
{
|
|
||||||
$chargestatic->id = $links[$key]['url_id'];
|
|
||||||
$chargestatic->ref = $links[$key]['url_id'];
|
|
||||||
|
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $chargestatic->getNomUrl(2);
|
|
||||||
if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) {
|
|
||||||
if ($reg[1] == 'socialcontribution')
|
|
||||||
$reg[1] = 'SocialContribution';
|
|
||||||
$chargestatic->lib = $langs->trans($reg[1]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
$chargestatic->lib = $links[$key]['label'];
|
$paymentstatic->id = $links[$key]['url_id'];
|
||||||
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2);
|
||||||
}
|
}
|
||||||
$chargestatic->ref = $chargestatic->lib;
|
else if ($links[$key]['type'] == 'payment_supplier')
|
||||||
$tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30);
|
|
||||||
|
|
||||||
$sqlmid = 'SELECT cchgsoc.accountancy_code';
|
|
||||||
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "c_chargesociales cchgsoc ";
|
|
||||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id";
|
|
||||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid";
|
|
||||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "bank_url as bkurl ON bkurl.url_id=paycharg.rowid";
|
|
||||||
$sqlmid .= " WHERE bkurl.fk_bank=" . $obj->rowid;
|
|
||||||
|
|
||||||
|
|
||||||
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
|
||||||
$resultmid = $db->query($sqlmid);
|
|
||||||
if ($resultmid)
|
|
||||||
{
|
{
|
||||||
$objmid = $db->fetch_object($resultmid);
|
$paymentsupplierstatic->id = $links[$key]['url_id'];
|
||||||
$tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount;
|
$paymentsupplierstatic->ref = $links[$key]['url_id'];
|
||||||
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2);
|
||||||
}
|
}
|
||||||
|
else if ($links[$key]['type'] == 'company')
|
||||||
|
{
|
||||||
|
$societestatic->id = $links[$key]['url_id'];
|
||||||
|
$societestatic->name = $links[$key]['label'];
|
||||||
|
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
|
||||||
|
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
||||||
|
}
|
||||||
|
else if ($links[$key]['type'] == 'user')
|
||||||
|
{
|
||||||
|
$userstatic->id = $links[$key]['url_id'];
|
||||||
|
$userstatic->name = $links[$key]['label'];
|
||||||
|
$tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30);
|
||||||
|
// $tabtp[$obj->rowid][$compta_user] += $obj->amount;
|
||||||
|
}
|
||||||
|
else if ($links[$key]['type'] == 'sc')
|
||||||
|
{
|
||||||
|
$chargestatic->id = $links[$key]['url_id'];
|
||||||
|
$chargestatic->ref = $links[$key]['url_id'];
|
||||||
|
|
||||||
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $chargestatic->getNomUrl(2);
|
||||||
|
if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) {
|
||||||
|
if ($reg[1] == 'socialcontribution')
|
||||||
|
$reg[1] = 'SocialContribution';
|
||||||
|
$chargestatic->lib = $langs->trans($reg[1]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$chargestatic->lib = $links[$key]['label'];
|
||||||
|
}
|
||||||
|
$chargestatic->ref = $chargestatic->lib;
|
||||||
|
$tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30);
|
||||||
|
|
||||||
|
$sqlmid = 'SELECT cchgsoc.accountancy_code';
|
||||||
|
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "c_chargesociales cchgsoc ";
|
||||||
|
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id";
|
||||||
|
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid";
|
||||||
|
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "bank_url as bkurl ON bkurl.url_id=paycharg.rowid";
|
||||||
|
$sqlmid .= " WHERE bkurl.fk_bank=" . $obj->rowid;
|
||||||
|
|
||||||
|
|
||||||
|
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
||||||
|
$resultmid = $db->query($sqlmid);
|
||||||
|
if ($resultmid)
|
||||||
|
{
|
||||||
|
$objmid = $db->fetch_object($resultmid);
|
||||||
|
$tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ($links[$key]['type'] == 'payment_donation')
|
||||||
|
{
|
||||||
|
$paymentdonstatic->id = $links[$key]['url_id'];
|
||||||
|
$paymentdonstatic->fk_donation = $links[$key]['url_id'];
|
||||||
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentDonation");
|
||||||
|
$tabtp[$obj->rowid][$accountancy_account_pay_donation] += $obj->amount;
|
||||||
|
}
|
||||||
|
else if ($links[$key]['type'] == 'payment_vat')
|
||||||
|
{
|
||||||
|
$paymentvatstatic->id = $links[$key]['url_id'];
|
||||||
|
$paymentvatstatic->ref = $links[$key]['url_id'];
|
||||||
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentVat");
|
||||||
|
$tabtp[$obj->rowid][$accountancy_account_pay_vat] += $obj->amount;
|
||||||
|
}
|
||||||
|
else if ($links[$key]['type'] == 'payment_salary')
|
||||||
|
{
|
||||||
|
$paymentsalstatic->id = $links[$key]['url_id'];
|
||||||
|
$paymentsalstatic->ref = $links[$key]['url_id'];
|
||||||
|
$paymentsalstatic->label = $links[$key]['label'];
|
||||||
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
|
||||||
|
$tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount;
|
||||||
|
}
|
||||||
|
else if ($links[$key]['type'] == 'banktransfert')
|
||||||
|
{
|
||||||
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
||||||
|
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
||||||
|
}
|
||||||
|
/*else {
|
||||||
|
$tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount;
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
else if ($links[$key]['type'] == 'payment_vat')
|
|
||||||
{
|
|
||||||
$paymentvatstatic->id = $links[$key]['url_id'];
|
|
||||||
$paymentvatstatic->ref = $links[$key]['url_id'];
|
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentVat");
|
|
||||||
$tabtp[$obj->rowid][$accountancy_account_pay_vat] += $obj->amount;
|
|
||||||
}
|
|
||||||
else if ($links[$key]['type'] == 'payment_salary')
|
|
||||||
{
|
|
||||||
$paymentsalstatic->id = $links[$key]['url_id'];
|
|
||||||
$paymentsalstatic->ref = $links[$key]['url_id'];
|
|
||||||
$paymentsalstatic->label = $links[$key]['label'];
|
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
|
|
||||||
$tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount;
|
|
||||||
}
|
|
||||||
else if ($links[$key]['type'] == 'banktransfert')
|
|
||||||
{
|
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
|
||||||
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
|
||||||
}
|
|
||||||
/*else {
|
|
||||||
$tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount;
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$tabbq[$obj->rowid][$compta_bank] += $obj->amount;
|
$tabbq[$obj->rowid][$compta_bank] += $obj->amount;
|
||||||
@ -335,7 +343,7 @@ if ($action == 'writeBookKeeping')
|
|||||||
$result = $bookkeeping->create();
|
$result = $bookkeeping->create();
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error ++;
|
$error ++;
|
||||||
setEventMessage($object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Third party
|
// Third party
|
||||||
@ -412,13 +420,13 @@ if ($action == 'writeBookKeeping')
|
|||||||
$result = $bookkeeping->create();
|
$result = $bookkeeping->create();
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error ++;
|
$error ++;
|
||||||
setEventMessage($object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($error)) {
|
if (empty($error)) {
|
||||||
setEventMessage($langs->trans("GeneralLedgerIsWritten"),'mesgs');
|
setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Export
|
// Export
|
||||||
|
|||||||
@ -185,7 +185,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$result = $bookkeeping->create();
|
$result = $bookkeeping->create();
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error ++;
|
$error ++;
|
||||||
setEventMessage($object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$result = $bookkeeping->create();
|
$result = $bookkeeping->create();
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error ++;
|
$error ++;
|
||||||
setEventMessage($object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -246,14 +246,14 @@ if ($action == 'writebookkeeping') {
|
|||||||
$result = $bookkeeping->create();
|
$result = $bookkeeping->create();
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error ++;
|
$error ++;
|
||||||
setEventMessage($object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($error)) {
|
if (empty($error)) {
|
||||||
setEventMessage($langs->trans("GeneralLedgerIsWritten"),'mesgs');
|
setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -220,7 +220,7 @@ if ($action == 'writebookkeeping')
|
|||||||
$result = $bookkeeping->create();
|
$result = $bookkeeping->create();
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error ++;
|
$error ++;
|
||||||
setEventMessage($object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -250,7 +250,7 @@ if ($action == 'writebookkeeping')
|
|||||||
$result = $bookkeeping->create();
|
$result = $bookkeeping->create();
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error ++;
|
$error ++;
|
||||||
setEventMessage($object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -282,14 +282,14 @@ if ($action == 'writebookkeeping')
|
|||||||
$result = $bookkeeping->create();
|
$result = $bookkeeping->create();
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error ++;
|
$error ++;
|
||||||
setEventMessage($object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($error)) {
|
if (empty($error)) {
|
||||||
setEventMessage($langs->trans("GeneralLedgerIsWritten"),'mesgs');
|
setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,7 @@ if ($action == 'ventil' && $user->rights->accounting->ventilation->dispatch) {
|
|||||||
dol_syslog('accountancy/supplier/card.php:: $sql=' . $sql);
|
dol_syslog('accountancy/supplier/card.php:: $sql=' . $sql);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if (! $resql) {
|
if (! $resql) {
|
||||||
setEventMessage($db->lasterror(), 'errors');
|
setEventMessages($db->lasterror(), null, 'errors');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
header("Location: ./lines.php");
|
header("Location: ./lines.php");
|
||||||
|
|||||||
@ -79,10 +79,10 @@ if ($action == 'validatehistory') {
|
|||||||
if (! $resql1) {
|
if (! $resql1) {
|
||||||
$error ++;
|
$error ++;
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($db->lasterror(), 'errors');
|
setEventMessages($db->lasterror(), null, 'errors');
|
||||||
} else {
|
} else {
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans('Dispatched'), 'mesgs');
|
setEventMessages($langs->trans('Dispatched'), null, 'mesgs');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -115,14 +115,14 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
|
|||||||
$resql1 = $db->query($sql1);
|
$resql1 = $db->query($sql1);
|
||||||
if (! $resql1) {
|
if (! $resql1) {
|
||||||
$error ++;
|
$error ++;
|
||||||
setEventMessage($db->lasterror(), 'errors');
|
setEventMessages($db->lasterror(), null, 'errors');
|
||||||
}
|
}
|
||||||
if (! $error) {
|
if (! $error) {
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans('Save'), 'mesgs');
|
setEventMessages($langs->trans('Save'), null, 'mesgs');
|
||||||
} else {
|
} else {
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($db->lasterror(), 'errors');
|
setEventMessages($db->lasterror(), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 J. Fernando Lagrange <fernando@demo-tic.org>
|
* Copyright (C) 2012 J. Fernando Lagrange <fernando@demo-tic.org>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -69,11 +69,11 @@ if ($action == 'update' || $action == 'add')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"), 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -60,11 +60,11 @@ if ($action == 'update')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"), 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled))
|
|||||||
print '<tr '.$bc[$var].' id="tremail"><td>';
|
print '<tr '.$bc[$var].' id="tremail"><td>';
|
||||||
print $langs->trans("MEMBER_PAYONLINE_SENDEMAIL");
|
print $langs->trans("MEMBER_PAYONLINE_SENDEMAIL");
|
||||||
print '</td><td align="right">';
|
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 '<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 "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -84,23 +84,24 @@ if ($object->id > 0)
|
|||||||
|
|
||||||
dol_fiche_head($head, 'agenda', $langs->trans("Member"),0,'user');
|
dol_fiche_head($head, 'agenda', $langs->trans("Member"),0,'user');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
// Reference
|
dol_banner_tab($object, 'rowid', $linkback);
|
||||||
print '<tr><td width="20%">'.$langs->trans('Ref').'</td>';
|
|
||||||
print '<td colspan="3">';
|
print '<div class="fichecenter">';
|
||||||
print $form->showrefnav($object, 'id', $linkback);
|
|
||||||
print '</td>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '</tr>';
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
// Login
|
// Login
|
||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
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 class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Type
|
||||||
|
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||||
|
|
||||||
// Morphy
|
// Morphy
|
||||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||||
/*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
|
/*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
|
||||||
@ -108,9 +109,6 @@ if ($object->id > 0)
|
|||||||
print '</td>';*/
|
print '</td>';*/
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Type
|
|
||||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
|
||||||
|
|
||||||
// Company
|
// 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">'.$object->societe.'</td></tr>';
|
||||||
|
|
||||||
@ -118,20 +116,12 @@ if ($object->id > 0)
|
|||||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Lastname
|
|
||||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="3">'.$object->lastname.' </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Firstname
|
|
||||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$object->firstname.' </td></tr>';
|
|
||||||
|
|
||||||
// Status
|
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$object->getLibStatut(4).'</td></tr>';
|
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Barre d'action
|
* Barre d'action
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2012-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2012-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -133,7 +133,7 @@ if (empty($reshook))
|
|||||||
if ($userid != $user->id && $userid != $object->user_id)
|
if ($userid != $user->id && $userid != $object->user_id)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessage($langs->trans("ErrorUserPermissionAllowsToLinksToItselfOnly"), 'errors');
|
setEventMessages($langs->trans("ErrorUserPermissionAllowsToLinksToItselfOnly"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ if (empty($reshook))
|
|||||||
$thirdparty=new Societe($db);
|
$thirdparty=new Societe($db);
|
||||||
$thirdparty->fetch($socid);
|
$thirdparty->fetch($socid);
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessage($langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->name), 'errors');
|
setEventMessages($langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->name), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,12 +195,12 @@ if (empty($reshook))
|
|||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
setEventMessage($langs->trans($nuser->error), 'errors');
|
setEventMessages($langs->trans($nuser->error), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($object->error, 'errors');
|
setEventMessages($object->errors, $object->error, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,13 +216,13 @@ if (empty($reshook))
|
|||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
setEventMessage($langs->trans($company->error), 'errors');
|
setEventMessages($langs->trans($company->error), null, 'errors');
|
||||||
setEventMessage($company->errors, 'errors');
|
setEventMessages($company->error, $company->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($object->error, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ if (empty($reshook))
|
|||||||
$result=$object->send_an_email($langs->transnoentitiesnoconv("ThisIsContentOfYourCard")."\n\n%INFOS%\n\n",$langs->transnoentitiesnoconv("CardContent"));
|
$result=$object->send_an_email($langs->transnoentitiesnoconv("ThisIsContentOfYourCard")."\n\n%INFOS%\n\n",$langs->transnoentitiesnoconv("CardContent"));
|
||||||
|
|
||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
setEventMessage($langs->trans("MailSuccessfulySent", $from, $object->email));
|
setEventMessages($langs->trans("MailSuccessfulySent", $from, $object->email), null, 'mesgs');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -257,12 +257,12 @@ if (empty($reshook))
|
|||||||
if ($morphy != 'mor' && empty($lastname)) {
|
if ($morphy != 'mor' && empty($lastname)) {
|
||||||
$error++;
|
$error++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname")), 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Lastname")), null, 'errors');
|
||||||
}
|
}
|
||||||
if ($morphy != 'mor' && (!isset($firstname) || $firstname=='')) {
|
if ($morphy != 'mor' && (!isset($firstname) || $firstname=='')) {
|
||||||
$error++;
|
$error++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname")), 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Firstname")), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create new object
|
// Create new object
|
||||||
@ -352,7 +352,7 @@ if (empty($reshook))
|
|||||||
$newfile=$dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']);
|
$newfile=$dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']);
|
||||||
if (! dol_move_uploaded_file($_FILES['photo']['tmp_name'],$newfile,1,0,$_FILES['photo']['error']) > 0)
|
if (! dol_move_uploaded_file($_FILES['photo']['tmp_name'],$newfile,1,0,$_FILES['photo']['error']) > 0)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorFailedToSaveFile"), 'errors');
|
setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -368,7 +368,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage("ErrorBadImageFormat", 'errors');
|
setEventMessages("ErrorBadImageFormat", null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -397,9 +397,9 @@ if (empty($reshook))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($object->error) {
|
if ($object->error) {
|
||||||
setEventMessage($object->error, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
setEventMessage($object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
$action='';
|
$action='';
|
||||||
}
|
}
|
||||||
@ -485,14 +485,14 @@ if (empty($reshook))
|
|||||||
// Check parameters
|
// Check parameters
|
||||||
if (empty($morphy) || $morphy == "-1") {
|
if (empty($morphy) || $morphy == "-1") {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Nature")), 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Nature")), null, 'errors');
|
||||||
}
|
}
|
||||||
// Test si le login existe deja
|
// Test si le login existe deja
|
||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||||
{
|
{
|
||||||
if (empty($login)) {
|
if (empty($login)) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Login")), 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("Login")), null, 'errors');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sql = "SELECT login FROM ".MAIN_DB_PREFIX."adherent WHERE login='".$db->escape($login)."'";
|
$sql = "SELECT login FROM ".MAIN_DB_PREFIX."adherent WHERE login='".$db->escape($login)."'";
|
||||||
@ -503,32 +503,32 @@ if (empty($reshook))
|
|||||||
if ($num) {
|
if ($num) {
|
||||||
$error++;
|
$error++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
setEventMessage($langs->trans("ErrorLoginAlreadyExists",$login), 'errors');
|
setEventMessages($langs->trans("ErrorLoginAlreadyExists",$login), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (empty($pass)) {
|
if (empty($pass)) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Password")), 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Password")), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($morphy != 'mor' && empty($lastname)) {
|
if ($morphy != 'mor' && empty($lastname)) {
|
||||||
$error++;
|
$error++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname")), 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Lastname")), null, 'errors');
|
||||||
}
|
}
|
||||||
if ($morphy != 'mor' && (!isset($firstname) || $firstname=='')) {
|
if ($morphy != 'mor' && (!isset($firstname) || $firstname=='')) {
|
||||||
$error++;
|
$error++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname")), 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Firstname")), null, 'errors');
|
||||||
}
|
}
|
||||||
if (! ($typeid > 0)) { // Keep () before !
|
if (! ($typeid > 0)) { // Keep () before !
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type")), 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors');
|
||||||
}
|
}
|
||||||
if ($conf->global->ADHERENT_MAIL_REQUIRED && ! isValidEMail($email)) {
|
if ($conf->global->ADHERENT_MAIL_REQUIRED && ! isValidEMail($email)) {
|
||||||
$error++;
|
$error++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
setEventMessage($langs->trans("ErrorBadEMail",$email), 'errors');
|
setEventMessages($langs->trans("ErrorBadEMail",$email), null, 'errors');
|
||||||
}
|
}
|
||||||
$public=0;
|
$public=0;
|
||||||
if (isset($public)) $public=1;
|
if (isset($public)) $public=1;
|
||||||
@ -554,9 +554,9 @@ if (empty($reshook))
|
|||||||
$db->rollback();
|
$db->rollback();
|
||||||
|
|
||||||
if ($object->error) {
|
if ($object->error) {
|
||||||
setEventMessage($object->error, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
setEventMessage($object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
@ -609,7 +609,7 @@ if (empty($reshook))
|
|||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessage($object->error, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -617,9 +617,9 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
if ($object->error) {
|
if ($object->error) {
|
||||||
setEventMessage($object->error, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
setEventMessage($object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -654,7 +654,7 @@ if (empty($reshook))
|
|||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessage($object->error, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -662,9 +662,9 @@ if (empty($reshook))
|
|||||||
$error++;
|
$error++;
|
||||||
|
|
||||||
if ($object->error) {
|
if ($object->error) {
|
||||||
setEventMessage($object->error, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
setEventMessage($object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
$action='';
|
$action='';
|
||||||
}
|
}
|
||||||
@ -683,7 +683,7 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
if (!$mailmanspip->del_to_spip($object))
|
if (!$mailmanspip->del_to_spip($object))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans('DeleteIntoSpipError').': '.$mailmanspip->error, 'errors');
|
setEventMessages($langs->trans('DeleteIntoSpipError').': '.$mailmanspip->error, null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -694,7 +694,7 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
if (!$mailmanspip->add_to_spip($object))
|
if (!$mailmanspip->add_to_spip($object))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans('AddIntoSpipError').': '.$mailmanspip->error, 'errors');
|
setEventMessages($langs->trans('AddIntoSpipError').': '.$mailmanspip->error, null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -802,13 +802,6 @@ else
|
|||||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").' / '.$langs->trans("Id").'</span></td><td><input type="text" name="member_login" size="40" value="'.(isset($_POST["member_login"])?$_POST["member_login"]:$object->login).'"></td></tr>';
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").' / '.$langs->trans("Id").'</span></td><td><input type="text" name="member_login" size="40" value="'.(isset($_POST["member_login"])?$_POST["member_login"]:$object->login).'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Moral-Physique
|
|
||||||
$morphys["phy"] = $langs->trans("Physical");
|
|
||||||
$morphys["mor"] = $langs->trans("Moral");
|
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Nature")."</td><td>\n";
|
|
||||||
print $form->selectarray("morphy", $morphys, GETPOST('morphy','alpha')?GETPOST('morphy','alpha'):$object->morphy, 1);
|
|
||||||
print "</td>\n";
|
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("MemberType").'</td><td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("MemberType").'</td><td>';
|
||||||
$listetype=$adht->liste_array();
|
$listetype=$adht->liste_array();
|
||||||
@ -820,6 +813,13 @@ else
|
|||||||
}
|
}
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
|
// Morphy
|
||||||
|
$morphys["phy"] = $langs->trans("Physical");
|
||||||
|
$morphys["mor"] = $langs->trans("Moral");
|
||||||
|
print '<tr><td class="fieldrequired">'.$langs->trans("Nature")."</td><td>\n";
|
||||||
|
print $form->selectarray("morphy", $morphys, GETPOST('morphy','alpha')?GETPOST('morphy','alpha'):$object->morphy, 1);
|
||||||
|
print "</td>\n";
|
||||||
|
|
||||||
// Company
|
// Company
|
||||||
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.(GETPOST('societe','alpha')?GETPOST('societe','alpha'):$object->societe).'"></td></tr>';
|
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.(GETPOST('societe','alpha')?GETPOST('societe','alpha'):$object->societe).'"></td></tr>';
|
||||||
|
|
||||||
@ -1050,7 +1050,7 @@ else
|
|||||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").' / '.$langs->trans("Id").'</span></td><td colspan="2"><input type="text" name="login" size="30" value="'.(isset($_POST["login"])?$_POST["login"]:$object->login).'"></td></tr>';
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").' / '.$langs->trans("Id").'</span></td><td colspan="2"><input type="text" name="login" size="30" value="'.(isset($_POST["login"])?$_POST["login"]:$object->login).'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Physique-Moral
|
// Morphy
|
||||||
$morphys["phy"] = $langs->trans("Physical");
|
$morphys["phy"] = $langs->trans("Physical");
|
||||||
$morphys["mor"] = $langs->trans("Morale");
|
$morphys["mor"] = $langs->trans("Morale");
|
||||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Nature").'</span></td><td>';
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Nature").'</span></td><td>';
|
||||||
@ -1402,37 +1402,29 @@ else
|
|||||||
if (! empty($conf->societe->enabled)) $rowspan++;
|
if (! empty($conf->societe->enabled)) $rowspan++;
|
||||||
if (! empty($conf->skype->enabled)) $rowspan++;
|
if (! empty($conf->skype->enabled)) $rowspan++;
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
// Ref
|
dol_banner_tab($object, 'rowid', $linkback);
|
||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
|
||||||
print '<td class="valeur" colspan="2">';
|
print '<div class="fichecenter">';
|
||||||
print $form->showrefnav($object, 'rowid', $linkback);
|
print '<div class="fichehalfleft">';
|
||||||
print '</td></tr>';
|
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
$showphoto='<td rowspan="'.$rowspan.'" align="center" class="hideonsmartphone" valign="middle" width="25%">';
|
print '<table class="border centpercent">';
|
||||||
$showphoto.=$form->showphoto('memberphoto',$object);
|
|
||||||
$showphoto.='</td>';
|
|
||||||
|
|
||||||
// Login
|
// Login
|
||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td>';
|
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||||
// Photo
|
|
||||||
print $showphoto; $showphoto='';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Morphy
|
|
||||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
|
||||||
print $showphoto; $showphoto='';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||||
|
|
||||||
|
// Morphy
|
||||||
|
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
// Company
|
// 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">'.$object->societe.'</td></tr>';
|
||||||
|
|
||||||
@ -1440,16 +1432,6 @@ else
|
|||||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Lastname
|
|
||||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$object->lastname.' </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Firstname
|
|
||||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$object->firstname.' </td></tr>';
|
|
||||||
|
|
||||||
// EMail
|
|
||||||
print '<tr><td>'.$langs->trans("EMail").'</td><td class="valeur">'.dol_print_email($object->email,0,$object->fk_soc,1).'</td></tr>';
|
|
||||||
|
|
||||||
// Password
|
// Password
|
||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||||
{
|
{
|
||||||
@ -1463,48 +1445,26 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Address
|
|
||||||
print '<tr><td>'.$langs->trans("Address").'</td><td class="valeur">';
|
|
||||||
dol_print_address($object->address,'gmap','member',$object->id);
|
|
||||||
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>';
|
|
||||||
|
|
||||||
// Country
|
|
||||||
print '<tr><td>'.$langs->trans("Country").'</td><td class="valeur">';
|
|
||||||
$img=picto_from_langcode($object->country_code);
|
|
||||||
if ($img) print $img.' ';
|
|
||||||
print getCountry($object->country_code);
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// State
|
|
||||||
print '<tr><td>'.$langs->trans('State').'</td><td class="valeur">'.$object->state.'</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>';
|
|
||||||
|
|
||||||
// Tel perso
|
|
||||||
print '<tr><td>'.$langs->trans("PhonePerso").'</td><td class="valeur">'.dol_print_phone($object->phone_perso,$object->country_code,0,$object->fk_soc,1).'</td></tr>';
|
|
||||||
|
|
||||||
// Tel mobile
|
|
||||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td class="valeur">'.dol_print_phone($object->phone_mobile,$object->country_code,0,$object->fk_soc,1).'</td></tr>';
|
|
||||||
|
|
||||||
// Skype
|
// Skype
|
||||||
if (! empty($conf->skype->enabled))
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Skype").'</td><td class="valeur">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Skype").'</td><td class="valeur">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
print '<div class="fichehalfright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
print '<table class="border tableforfield" width="100%">';
|
||||||
|
|
||||||
// Birthday
|
// Birthday
|
||||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||||
|
|
||||||
// Public
|
// Public
|
||||||
print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';
|
||||||
|
|
||||||
// Status
|
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$object->getLibStatut(4).'</td></tr>';
|
|
||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||||
{
|
{
|
||||||
@ -1592,14 +1552,34 @@ else
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date end subscription
|
||||||
|
print '<tr><td>'.$langs->trans("SubscriptionEndDate").'</td><td class="valeur">';
|
||||||
|
if ($object->datefin)
|
||||||
|
{
|
||||||
|
print dol_print_date($object->datefin,'day');
|
||||||
|
if ($object->hasDelay()) {
|
||||||
|
print " ".img_warning($langs->trans("Late"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $langs->trans("SubscriptionNotReceived");
|
||||||
|
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
print "</div>\n";
|
print "</div></div></div>\n";
|
||||||
|
print '<div style="clear:both"></div>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Hotbar
|
* Hotbar
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
|
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
|
||||||
|
|||||||
@ -110,7 +110,7 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights
|
|||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$errmsg=$langs->trans($company->error);
|
$errmsg=$langs->trans($company->error);
|
||||||
setEventMessage($company->errors, 'errors');
|
setEventMessages($company->error, $company->errors, 'errors');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -131,7 +131,7 @@ if ($action == 'setuserid' && ($user->rights->user->self->creer || $user->rights
|
|||||||
if ($_POST["userid"] != $user->id && $_POST["userid"] != $object->user_id)
|
if ($_POST["userid"] != $user->id && $_POST["userid"] != $object->user_id)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessage($langs->trans("ErrorUserPermissionAllowsToLinksToItselfOnly"), 'errors');
|
setEventMessages($langs->trans("ErrorUserPermissionAllowsToLinksToItselfOnly"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ if ($action == 'setsocid')
|
|||||||
$thirdparty=new Societe($db);
|
$thirdparty=new Societe($db);
|
||||||
$thirdparty->fetch(GETPOST('socid','int'));
|
$thirdparty->fetch(GETPOST('socid','int'));
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessage($langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->name), 'errors');
|
setEventMessages($langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->name), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -567,54 +567,155 @@ if ($rowid > 0)
|
|||||||
|
|
||||||
dol_fiche_head($head, 'subscription', $langs->trans("Member"), 0, 'user');
|
dol_fiche_head($head, 'subscription', $langs->trans("Member"), 0, 'user');
|
||||||
|
|
||||||
|
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
|
dol_banner_tab($object, 'rowid', $linkback);
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
print '<div class="fichehalfleft">';
|
||||||
|
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
// 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>';
|
||||||
|
}
|
||||||
|
|
||||||
// Ref
|
// Type
|
||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||||
print '<td class="valeur" colspan="2">';
|
|
||||||
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>';
|
// Morphy
|
||||||
|
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
// Login
|
// Company
|
||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.'</td></tr>';
|
||||||
{
|
|
||||||
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td>';
|
|
||||||
print $showphoto; $showphoto='';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Morphy
|
// Civility
|
||||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
||||||
print $showphoto; $showphoto='';
|
print '</tr>';
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Type
|
// Password
|
||||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("Password").'</td><td>'.preg_replace('/./i','*',$object->pass);
|
||||||
|
if ((! empty($object->pass) || ! empty($object->pass_crypted)) && empty($object->user_id))
|
||||||
|
{
|
||||||
|
$langs->load("errors");
|
||||||
|
$htmltext=$langs->trans("WarningPasswordSetWithNoAccount");
|
||||||
|
print ' '.$form->textwithpicto('', $htmltext,1,'warning');
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Company
|
// Skype
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.'</td></tr>';
|
if (! empty($conf->skype->enabled))
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("Skype").'</td><td class="valeur">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Civility
|
print '</table>';
|
||||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
|
||||||
print '</tr>';
|
print '</div>';
|
||||||
|
print '<div class="fichehalfright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
print '<table class="border tableforfield" width="100%">';
|
||||||
|
|
||||||
|
// Birthday
|
||||||
|
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||||
|
|
||||||
// Lastname
|
// Public
|
||||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$object->lastname.' </td>';
|
print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Firstname
|
// Categories
|
||||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$object->firstname.' </td>';
|
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||||
print '</tr>';
|
{
|
||||||
|
print '<tr><td>' . $langs->trans("Categories") . '</td>';
|
||||||
|
print '<td colspan="2">';
|
||||||
|
print $form->showCategories($object->id, 'member', 1);
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// EMail
|
// Other attributes
|
||||||
print '<tr><td>'.$langs->trans("EMail").'</td><td class="valeur">'.dol_print_email($object->email,0,$object->fk_soc,1).'</td></tr>';
|
$parameters=array('colspan'=>2);
|
||||||
|
$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, 'view', $parameters);
|
||||||
|
}
|
||||||
|
|
||||||
// Status
|
// Third party Dolibarr
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$object->getLibStatut(4).'</td></tr>';
|
if (! empty($conf->societe->enabled))
|
||||||
|
{
|
||||||
|
print '<tr><td>';
|
||||||
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
|
print $langs->trans("LinkedToDolibarrThirdParty");
|
||||||
|
print '</td>';
|
||||||
|
if ($action != 'editthirdparty' && $user->rights->adherent->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editthirdparty&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToThirdParty'),1).'</a></td>';
|
||||||
|
print '</tr></table>';
|
||||||
|
print '</td><td colspan="2" class="valeur">';
|
||||||
|
if ($action == 'editthirdparty')
|
||||||
|
{
|
||||||
|
$htmlname='socid';
|
||||||
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" name="form'.$htmlname.'">';
|
||||||
|
print '<input type="hidden" name="rowid" value="'.$object->id.'">';
|
||||||
|
print '<input type="hidden" name="action" value="set'.$htmlname.'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
||||||
|
print '<tr><td>';
|
||||||
|
print $form->select_company($object->fk_soc,'socid','',1);
|
||||||
|
print '</td>';
|
||||||
|
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||||
|
print '</tr></table></form>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($object->fk_soc)
|
||||||
|
{
|
||||||
|
$company=new Societe($db);
|
||||||
|
$result=$company->fetch($object->fk_soc);
|
||||||
|
print $company->getNomUrl(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $langs->trans("NoThirdPartyAssociatedToMember");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Login Dolibarr
|
||||||
|
print '<tr><td>';
|
||||||
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
|
print $langs->trans("LinkedToDolibarrUser");
|
||||||
|
print '</td>';
|
||||||
|
if ($action != 'editlogin' && $user->rights->adherent->creer)
|
||||||
|
{
|
||||||
|
print '<td align="right">';
|
||||||
|
if ($user->rights->user->user->creer)
|
||||||
|
{
|
||||||
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=editlogin&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToUser'),1).'</a>';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
print '</tr></table>';
|
||||||
|
print '</td><td colspan="2" class="valeur">';
|
||||||
|
if ($action == 'editlogin')
|
||||||
|
{
|
||||||
|
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'userid','');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($object->user_id)
|
||||||
|
{
|
||||||
|
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'none');
|
||||||
|
}
|
||||||
|
else print $langs->trans("NoDolibarrAccess");
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date end subscription
|
// Date end subscription
|
||||||
print '<tr><td>'.$langs->trans("SubscriptionEndDate").'</td><td class="valeur">';
|
print '<tr><td>'.$langs->trans("SubscriptionEndDate").'</td><td class="valeur">';
|
||||||
@ -632,83 +733,16 @@ if ($rowid > 0)
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Third party Dolibarr
|
|
||||||
if (! empty($conf->societe->enabled))
|
|
||||||
{
|
|
||||||
print '<tr><td>';
|
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
|
||||||
print $langs->trans("LinkedToDolibarrThirdParty");
|
|
||||||
print '</td>';
|
|
||||||
if ($action != 'editthirdparty' && $user->rights->adherent->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editthirdparty&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToThirdParty'),1).'</a></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td class="valeur">';
|
|
||||||
if ($action == 'editthirdparty')
|
|
||||||
{
|
|
||||||
$htmlname='socid';
|
|
||||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" name="form'.$htmlname.'">';
|
|
||||||
print '<input type="hidden" name="rowid" value="'.$object->id.'">';
|
|
||||||
print '<input type="hidden" name="action" value="set'.$htmlname.'">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
|
||||||
print '<tr><td>';
|
|
||||||
print $form->select_company($object->fk_soc,'socid','',1);
|
|
||||||
print '</td>';
|
|
||||||
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
|
||||||
print '</tr></table></form>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ($object->fk_soc)
|
|
||||||
{
|
|
||||||
$company=new Societe($db);
|
|
||||||
$result=$company->fetch($object->fk_soc);
|
|
||||||
print $company->getNomUrl(1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print $langs->trans("NoThirdPartyAssociatedToMember");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Login Dolibarr
|
|
||||||
print '<tr><td>';
|
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
|
||||||
print $langs->trans("LinkedToDolibarrUser");
|
|
||||||
print '</td>';
|
|
||||||
if ($action != 'editlogin' && $user->rights->adherent->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editlogin&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToUser'),1).'</a></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td class="valeur">';
|
|
||||||
if ($action == 'editlogin')
|
|
||||||
{
|
|
||||||
/*$include=array();
|
|
||||||
if (empty($user->rights->user->user->creer)) // If can edit only itself user, we can link to itself only
|
|
||||||
{
|
|
||||||
$include=array($object->user_id,$user->id);
|
|
||||||
}*/
|
|
||||||
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'userid','');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ($object->user_id)
|
|
||||||
{
|
|
||||||
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'none');
|
|
||||||
}
|
|
||||||
else print $langs->trans("NoDolibarrAccess");
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
|
print "</div></div></div>\n";
|
||||||
|
print '<div style="clear:both"></div>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
|
||||||
dol_htmloutput_errors($errmsg,$errmsgs);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Hotbar
|
* Hotbar
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1575,7 +1575,7 @@ class Adherent extends CommonObject
|
|||||||
|
|
||||||
$picto='user';
|
$picto='user';
|
||||||
|
|
||||||
if ($withpicto) $result.=($link.img_object($label, $picto, 'class="classfortooltip"').$linkend);
|
if ($withpicto) $result.=($link.img_object('', $picto, 'class="classfortooltip"').$linkend);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
$result.=$link.($maxlen?dol_trunc($this->ref,$maxlen):$this->ref).$linkend;
|
$result.=$link.($maxlen?dol_trunc($this->ref,$maxlen):$this->ref).$linkend;
|
||||||
return $result;
|
return $result;
|
||||||
@ -1976,12 +1976,14 @@ class Adherent extends CommonObject
|
|||||||
|
|
||||||
// Process
|
// Process
|
||||||
foreach ($to_del as $del) {
|
foreach ($to_del as $del) {
|
||||||
$c->fetch($del);
|
if ($c->fetch($del) > 0) {
|
||||||
$c->del_type($this, 'member');
|
$c->del_type($this, 'member');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
foreach ($to_add as $add) {
|
foreach ($to_add as $add) {
|
||||||
$c->fetch($add);
|
if ($c->fetch($add) > 0) {
|
||||||
$c->add_type($this, 'member');
|
$c->add_type($this, 'member');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -83,6 +83,7 @@ include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$form = new Form($db);
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
@ -91,19 +92,7 @@ if ($id > 0)
|
|||||||
$result=$membert->fetch($object->typeid);
|
$result=$membert->fetch($object->typeid);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* Affichage onglets
|
|
||||||
*/
|
|
||||||
if (! empty($conf->notification->enabled))
|
|
||||||
$langs->load("mails");
|
|
||||||
|
|
||||||
$head = member_prepare_head($object);
|
|
||||||
|
|
||||||
$form=new Form($db);
|
|
||||||
|
|
||||||
dol_fiche_head($head, 'document', $langs->trans("Member"),0,'user');
|
|
||||||
|
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Construit liste des fichiers
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
@ -111,34 +100,41 @@ if ($id > 0)
|
|||||||
{
|
{
|
||||||
$totalsize+=$file['size'];
|
$totalsize+=$file['size'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! empty($conf->notification->enabled))
|
||||||
|
$langs->load("mails");
|
||||||
|
|
||||||
|
$head = member_prepare_head($object);
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
dol_fiche_head($head, 'document', $langs->trans("Member"),0,'user');
|
||||||
|
|
||||||
|
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
|
dol_banner_tab($object, 'rowid', $linkback);
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
// Ref
|
|
||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
|
||||||
print '<td class="valeur">';
|
|
||||||
print $form->showrefnav($object, 'rowid', $linkback);
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Login
|
// Login
|
||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
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 class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Type
|
||||||
|
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$membert->getNomUrl(1)."</td></tr>\n";
|
||||||
|
|
||||||
// Morphy
|
// Morphy
|
||||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||||
/*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
|
/*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
|
||||||
print $form->showphoto('memberphoto',$object);
|
print $form->showphoto('memberphoto',$object);
|
||||||
print '</td>';*/
|
print '</td>';*/
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Type
|
|
||||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$membert->getNomUrl(1)."</td></tr>\n";
|
|
||||||
|
|
||||||
// Company
|
// 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">'.$object->societe.'</td></tr>';
|
||||||
|
|
||||||
@ -146,17 +142,6 @@ if ($id > 0)
|
|||||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Lastname
|
|
||||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$object->lastname.' </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Firstname
|
|
||||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$object->firstname.' </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Status
|
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$object->getLibStatut(4).'</td></tr>';
|
|
||||||
|
|
||||||
// Nbre fichiers
|
// Nbre fichiers
|
||||||
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||||
|
|
||||||
@ -166,6 +151,8 @@ if ($id > 0)
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
$modulepart = 'member';
|
$modulepart = 'member';
|
||||||
$permission = $user->rights->adherent->creer;
|
$permission = $user->rights->adherent->creer;
|
||||||
|
|||||||
@ -180,18 +180,24 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
|||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
dol_fiche_head($head, 'general', $langs->trans("Subscription"), 0, 'payment');
|
|
||||||
|
|
||||||
print "\n";
|
|
||||||
print '<form name="update" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
print '<form name="update" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
||||||
print "<input type=\"hidden\" name=\"rowid\" value=\"$rowid\">";
|
print "<input type=\"hidden\" name=\"rowid\" value=\"$rowid\">";
|
||||||
print "<input type=\"hidden\" name=\"fk_bank\" value=\"".$subscription->fk_bank."\">";
|
print "<input type=\"hidden\" name=\"fk_bank\" value=\"".$subscription->fk_bank."\">";
|
||||||
|
|
||||||
|
dol_fiche_head($head, 'general', $langs->trans("Subscription"), 0, 'payment');
|
||||||
|
|
||||||
|
print "\n";
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/cotisations.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td class="valeur" colspan="2">'.$subscription->ref.' </td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
||||||
|
print '<td class="valeur" colspan="3">';
|
||||||
|
print $form->showrefnav($subscription, 'rowid', $linkback, 1);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Member
|
// Member
|
||||||
$adh->ref=$adh->getFullName($langs);
|
$adh->ref=$adh->getFullName($langs);
|
||||||
@ -239,18 +245,18 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td colspan="3" align="center">';
|
print '</table>';
|
||||||
print '<input type="submit" class="button" name="submit" value="'.$langs->trans("Save").'">';
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
|
print '<div class="center">';
|
||||||
|
print '<input type="submit" class="button" name="submit" value="'.$langs->trans("Save").'">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
print '</td></tr>';
|
print '</div>';
|
||||||
|
|
||||||
print '</table>';
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
print '</div>';
|
|
||||||
print "\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($rowid && $action != 'edit')
|
if ($rowid && $action != 'edit')
|
||||||
@ -355,8 +361,7 @@ if ($rowid && $action != 'edit')
|
|||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
print "</div>\n";
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Barre d'actions
|
* Barre d'actions
|
||||||
@ -388,6 +393,6 @@ if ($rowid && $action != 'edit')
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
$db->close();
|
||||||
|
|||||||
@ -125,29 +125,32 @@ if ($result)
|
|||||||
//print '<tr><td width="30%" class="notopnoleft" valign="top">';
|
//print '<tr><td width="30%" class="notopnoleft" valign="top">';
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
// Search contact/address
|
||||||
|
if (! empty($conf->adherent->enabled) && $user->rights->adherent->lire)
|
||||||
|
{
|
||||||
|
$listofsearchfields['search_member']=array('text'=>'Member');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($listofsearchfields))
|
||||||
|
{
|
||||||
|
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<table class="noborder nohover centpercent">';
|
||||||
|
$i=0;
|
||||||
|
foreach($listofsearchfields as $key => $value)
|
||||||
|
{
|
||||||
|
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
|
||||||
|
print '<tr>';
|
||||||
|
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat" name="'.$key.'" id="'.$key.'" size="18"></td>';
|
||||||
|
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
|
||||||
|
print '</tr>';
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
print '</table>';
|
||||||
|
print '</form>';
|
||||||
|
print '<br>';
|
||||||
|
}
|
||||||
|
|
||||||
// Formulaire recherche adherent
|
|
||||||
print '<form action="list.php" method="post">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="action" value="search">';
|
|
||||||
print '<table class="noborder nohover" width="100%">';
|
|
||||||
print '<tr class="liste_titre">';
|
|
||||||
print '<td colspan="3">'.$langs->trans("SearchAMember").'</td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
$var=false;
|
|
||||||
print "<tr ".$bc[$var].">";
|
|
||||||
print '<td>';
|
|
||||||
print '<label for="search_ref">'.$langs->trans("Ref").'</label>:</td><td><input type="text" name="search_ref" id="search_ref" class="flat" size="16">';
|
|
||||||
print '</td><td rowspan="3"><input class="button" type="submit" value="'.$langs->trans("Search").'"></td></tr>';
|
|
||||||
print "<tr ".$bc[$var].">";
|
|
||||||
print '<td>';
|
|
||||||
print '<label for="search_lastname">'.$langs->trans("Name").'</label>:</td><td><input type="text" name="search_lastname" id="search_lastname" class="flat" size="16">';
|
|
||||||
print '</td></tr>';
|
|
||||||
print "<tr ".$bc[$var].">";
|
|
||||||
print '<td>';
|
|
||||||
print '<label for="sall">'.$langs->trans("Other").'</label>:</td><td><input type="text" name="sall" id="sall" class="flat" size="16">';
|
|
||||||
print '</td></tr>';
|
|
||||||
print "</table></form>";
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -156,7 +159,6 @@ print "</table></form>";
|
|||||||
|
|
||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
print '<br>';
|
|
||||||
print '<table class="noborder nohover" width="100%">';
|
print '<table class="noborder nohover" width="100%">';
|
||||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").'</td></tr>';
|
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").'</td></tr>';
|
||||||
print '<tr '.$bc[0].'><td align="center" colspan="2">';
|
print '<tr '.$bc[0].'><td align="center" colspan="2">';
|
||||||
|
|||||||
@ -42,23 +42,34 @@ $result=restrictedArea($user,'adherent',$id);
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$form = new Form($db);
|
||||||
|
|
||||||
llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
||||||
|
|
||||||
$adh = new Adherent($db);
|
$object = new Adherent($db);
|
||||||
$adh->fetch($id);
|
$object->fetch($id);
|
||||||
$adh->info($id);
|
$object->info($id);
|
||||||
|
|
||||||
$head = member_prepare_head($adh);
|
$head = member_prepare_head($object);
|
||||||
|
|
||||||
dol_fiche_head($head, 'info', $langs->trans("Member"), 0, 'user');
|
dol_fiche_head($head, 'info', $langs->trans("Member"), 0, 'user');
|
||||||
|
|
||||||
|
|
||||||
print '<table width="100%"><tr><td>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
dol_print_object_info($adh);
|
|
||||||
print '</td></tr></table>';
|
dol_banner_tab($object, 'rowid', $linkback);
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
dol_print_object_info($object);
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -44,12 +44,11 @@ if ($user->societe_id > 0)
|
|||||||
$socid = $user->societe_id;
|
$socid = $user->societe_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$adh = new Adherent($db);
|
$object = new Adherent($db);
|
||||||
$adh->id = $rowid;
|
$result=$object->fetch($rowid);
|
||||||
$result=$adh->fetch($rowid);
|
|
||||||
if (! $result)
|
if (! $result)
|
||||||
{
|
{
|
||||||
dol_print_error($db,"Failed to get adherent: ".$adh->error);
|
dol_print_error($db,"Failed to get adherent: ".$object->error);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,20 +64,20 @@ if ($action == 'dolibarr2ldap')
|
|||||||
$ldap=new Ldap();
|
$ldap=new Ldap();
|
||||||
$result=$ldap->connect_bind();
|
$result=$ldap->connect_bind();
|
||||||
|
|
||||||
$info=$adh->_load_ldap_info();
|
$info=$object->_load_ldap_info();
|
||||||
$dn=$adh->_load_ldap_dn($info);
|
$dn=$object->_load_ldap_dn($info);
|
||||||
$olddn=$dn; // We can say that old dn = dn as we force synchro
|
$olddn=$dn; // We can say that old dn = dn as we force synchro
|
||||||
|
|
||||||
$result=$ldap->update($dn,$info,$user,$olddn);
|
$result=$ldap->update($dn,$info,$user,$olddn);
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("MemberSynchronized"));
|
setEventMessages($langs->trans("MemberSynchronized"), null, 'mesgs');
|
||||||
$db->commit();
|
$db->commit();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($ldap->error, 'errors');
|
setEventMessages($ldap->errors, $ldap->error, 'errors');
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -93,35 +92,27 @@ llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhé
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
$head = member_prepare_head($adh);
|
$head = member_prepare_head($object);
|
||||||
|
|
||||||
dol_fiche_head($head, 'ldap', $langs->trans("Member"), 0, 'user');
|
dol_fiche_head($head, 'ldap', $langs->trans("Member"), 0, 'user');
|
||||||
|
|
||||||
|
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
dol_banner_tab($object, 'rowid', $linkback);
|
||||||
|
|
||||||
// Ref
|
print '<div class="fichecenter">';
|
||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
|
||||||
print '<td class="valeur">';
|
|
||||||
print $form->showrefnav($adh,'id');
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Lastname
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$adh->lastname.' </td>';
|
print '<table class="border centpercent">';
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Firstname
|
|
||||||
print '<tr><td width="15%">'.$langs->trans("Firstname").'</td><td class="valeur">'.$adh->firstname.' </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Login
|
// Login
|
||||||
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur">'.$adh->login.' </td></tr>';
|
print '<tr><td class="titlefield">'.$langs->trans("Login").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||||
|
|
||||||
// Password not crypted
|
// Password not crypted
|
||||||
if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD))
|
if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("LDAPFieldPasswordNotCrypted").'</td>';
|
print '<tr><td>'.$langs->trans("LDAPFieldPasswordNotCrypted").'</td>';
|
||||||
print '<td class="valeur">'.$adh->pass.'</td>';
|
print '<td class="valeur">'.$object->pass.'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,12 +120,12 @@ if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD))
|
|||||||
if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED))
|
if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("LDAPFieldPasswordCrypted").'</td>';
|
print '<tr><td>'.$langs->trans("LDAPFieldPasswordCrypted").'</td>';
|
||||||
print '<td class="valeur">'.$adh->pass_crypted.'</td>';
|
print '<td class="valeur">'.$object->pass_crypted.'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adh->type."</td></tr>\n";
|
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$object->type."</td></tr>\n";
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
|
||||||
@ -155,6 +146,8 @@ print '</table>';
|
|||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Barre d'actions
|
* Barre d'actions
|
||||||
*/
|
*/
|
||||||
@ -163,7 +156,7 @@ print '<div class="tabsAction">';
|
|||||||
|
|
||||||
if (! empty($conf->global->LDAP_MEMBER_ACTIVE) && $conf->global->LDAP_MEMBER_ACTIVE != 'ldap2dolibarr')
|
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 '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dolibarr2ldap">'.$langs->trans("ForceSynchronize").'</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</div>\n";
|
print "</div>\n";
|
||||||
@ -187,9 +180,9 @@ $ldap=new Ldap();
|
|||||||
$result=$ldap->connect_bind();
|
$result=$ldap->connect_bind();
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$info=$adh->_load_ldap_info();
|
$info=$object->_load_ldap_info();
|
||||||
$dn=$adh->_load_ldap_dn($info,1);
|
$dn=$object->_load_ldap_dn($info,1);
|
||||||
$search = "(".$adh->_load_ldap_dn($info,2).")";
|
$search = "(".$object->_load_ldap_dn($info,2).")";
|
||||||
|
|
||||||
if (empty($dn))
|
if (empty($dn))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -78,6 +78,21 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
|
|||||||
$hookmanager->initHooks(array('memberlist'));
|
$hookmanager->initHooks(array('memberlist'));
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
|
// List of fields to search into when doing a "search in all"
|
||||||
|
$fieldstosearchall = array(
|
||||||
|
'd.rowid'=>'Ref',
|
||||||
|
//'d.ref'=>'Ref',
|
||||||
|
'd.lastname'=>'Lastname',
|
||||||
|
'd.firstname'=>'Firstname',
|
||||||
|
'd.societe'=>"Company",
|
||||||
|
'd.email'=>'EMail',
|
||||||
|
'd.address'=>'Address',
|
||||||
|
'd.zip'=>'Zip',
|
||||||
|
'd.town'=>'Town',
|
||||||
|
'd.note_public'=>'NotePublic',
|
||||||
|
'd.note_private'=>'NotePrivate',
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
@ -111,7 +126,7 @@ if ($catid == -2) $sql.= " AND cm.fk_categorie IS NULL";
|
|||||||
if ($search_categ > 0) $sql.= " AND cm.fk_categorie = ".$db->escape($search_categ);
|
if ($search_categ > 0) $sql.= " AND cm.fk_categorie = ".$db->escape($search_categ);
|
||||||
if ($search_categ == -2) $sql.= " AND cm.fk_categorie IS NULL";
|
if ($search_categ == -2) $sql.= " AND cm.fk_categorie IS NULL";
|
||||||
$sql.= " AND d.entity IN (".getEntity('adherent', 1).")";
|
$sql.= " AND d.entity IN (".getEntity('adherent', 1).")";
|
||||||
if ($sall) $sql.=natural_search(array("d.rowid", "d.firstname", "d.lastname", "d.societe", "d.email", "d.login", "d.address", "d.town", "d.note_public", "d.note_private"), $sall);
|
if ($sall) $sql.=natural_search(array_keys($fieldstosearchall), $sall);
|
||||||
if ($type > 0) $sql.=" AND t.rowid=".$db->escape($type);
|
if ($type > 0) $sql.=" AND t.rowid=".$db->escape($type);
|
||||||
if (isset($_GET["statut"]) || isset($_POST["statut"])) $sql.=" AND d.statut in (".$db->escape($statut).")"; // Peut valoir un nombre ou liste de nombre separes par virgules
|
if (isset($_GET["statut"]) || isset($_POST["statut"])) $sql.=" AND d.statut in (".$db->escape($statut).")"; // Peut valoir un nombre ou liste de nombre separes par virgules
|
||||||
if ($search_ref)
|
if ($search_ref)
|
||||||
@ -180,28 +195,29 @@ if ($resql)
|
|||||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||||
print_barre_liste($titre,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
print_barre_liste($titre,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
||||||
|
|
||||||
if ($sall)
|
|
||||||
{
|
|
||||||
print $langs->trans("Filter")." (".$langs->trans("Ref").", ".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ";
|
|
||||||
print '<strong>'.$sall.'</strong>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].($param?'?'.$param:'').'">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].($param?'?'.$param:'').'">';
|
||||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
|
||||||
|
if ($sall)
|
||||||
|
{
|
||||||
|
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
||||||
|
print $langs->trans("FilterOnInto", $sall, join(', ',$fieldstosearchall));
|
||||||
|
}
|
||||||
|
|
||||||
// Filter on categories
|
// Filter on categories
|
||||||
$moreforfilter='';
|
$moreforfilter='';
|
||||||
if (! empty($conf->categorie->enabled))
|
if (! empty($conf->categorie->enabled))
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||||
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||||
$moreforfilter.=$formother->select_categories(Categorie::TYPE_MEMBER,$search_categ,'search_categ',1);
|
$moreforfilter.=$formother->select_categories(Categorie::TYPE_MEMBER,$search_categ,'search_categ',1);
|
||||||
$moreforfilter.=' ';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
if (! empty($moreforfilter))
|
if (! empty($moreforfilter))
|
||||||
{
|
{
|
||||||
print '<div class="liste_titre">';
|
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||||
print $moreforfilter;
|
print $moreforfilter;
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||||
@ -209,7 +225,7 @@ if ($resql)
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
|
||||||
print '<tr class="liste_titre">';
|
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("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.lastname",$param,"","",$sortfield,$sortorder);
|
||||||
|
|||||||
@ -73,33 +73,31 @@ if ($id)
|
|||||||
print "<form method=\"post\" action=\"".$_SERVER['PHP_SELF']."\">";
|
print "<form method=\"post\" action=\"".$_SERVER['PHP_SELF']."\">";
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
dol_banner_tab($object, 'rowid', $linkback);
|
||||||
|
|
||||||
// Reference
|
print '<div class="fichecenter">';
|
||||||
print '<tr><td width="20%">'.$langs->trans('Ref').'</td>';
|
|
||||||
print '<td colspan="3">';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print $form->showrefnav($object, 'id', $linkback);
|
print '<table class="border centpercent">';
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Login
|
// Login
|
||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
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 class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Type
|
||||||
|
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||||
|
|
||||||
// Morphy
|
// Morphy
|
||||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||||
/*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
|
/*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
|
||||||
print $form->showphoto('memberphoto',$member);
|
print $form->showphoto('memberphoto',$member);
|
||||||
print '</td>';*/
|
print '</td>';*/
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Type
|
|
||||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
|
||||||
|
|
||||||
// Company
|
// 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">'.$object->societe.'</td></tr>';
|
||||||
|
|
||||||
@ -107,21 +105,13 @@ if ($id)
|
|||||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Lastname
|
|
||||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="3">'.$object->lastname.' </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Firstname
|
|
||||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$object->firstname.' </td></tr>';
|
|
||||||
|
|
||||||
// Status
|
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$object->getLibStatut(4).'</td></tr>';
|
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
$colwidth='20';
|
$cssclass='titlefield';
|
||||||
$permission = $user->rights->adherent->creer; // Used by the include of notes.tpl.php
|
$permission = $user->rights->adherent->creer; // Used by the include of notes.tpl.php
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
||||||
|
|
||||||
|
|||||||
@ -116,7 +116,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Print array
|
// Print array
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td align="center">'.$langs->trans("Nature").'</td>';
|
print '<td align="center">'.$langs->trans("Nature").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("NbOfMembers").'</td>';
|
print '<td align="center">'.$langs->trans("NbOfMembers").'</td>';
|
||||||
|
|||||||
@ -282,7 +282,7 @@ if (count($arrayjs) && $mode == 'memberbycountry')
|
|||||||
if ($mode)
|
if ($mode)
|
||||||
{
|
{
|
||||||
// Print array / Affiche le tableau
|
// Print array / Affiche le tableau
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td align="center">'.$label.'</td>';
|
print '<td align="center">'.$label.'</td>';
|
||||||
if ($label2) print '<td align="center">'.$label2.'</td>';
|
if ($label2) print '<td align="center">'.$label2.'</td>';
|
||||||
|
|||||||
@ -167,8 +167,8 @@ print '<br><br>';
|
|||||||
$data = $stats->getAllByYear();
|
$data = $stats->getAllByYear();
|
||||||
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="noborder">';
|
||||||
print '<tr height="24">';
|
print '<tr class="liste_titre" height="24">';
|
||||||
print '<td align="center">'.$langs->trans("Year").'</td>';
|
print '<td align="center">'.$langs->trans("Year").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("NbOfSubscriptions").'</td>';
|
print '<td align="center">'.$langs->trans("NbOfSubscriptions").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("AmountTotal").'</td>';
|
print '<td align="center">'.$langs->trans("AmountTotal").'</td>';
|
||||||
@ -176,14 +176,15 @@ print '<td align="center">'.$langs->trans("AmountAverage").'</td>';
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$oldyear=0;
|
$oldyear=0;
|
||||||
|
$var=false;
|
||||||
foreach ($data as $val)
|
foreach ($data as $val)
|
||||||
{
|
{
|
||||||
$year = $val['year'];
|
$year = $val['year'];
|
||||||
print $avg;
|
|
||||||
while ($oldyear > $year+1)
|
while ($oldyear > $year+1)
|
||||||
{ // If we have empty year
|
{ // If we have empty year
|
||||||
$oldyear--;
|
$oldyear--;
|
||||||
print '<tr height="24">';
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].' height="24">';
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<a href="month.php?year='.$oldyear.'&mode='.$mode.'">';
|
print '<a href="month.php?year='.$oldyear.'&mode='.$mode.'">';
|
||||||
print $oldyear;
|
print $oldyear;
|
||||||
@ -194,7 +195,8 @@ foreach ($data as $val)
|
|||||||
print '<td align="right">0</td>';
|
print '<td align="right">0</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
print '<tr height="24">';
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].' height="24">';
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
//print '<a href="month.php?year='.$year.'">';
|
//print '<a href="month.php?year='.$year.'">';
|
||||||
print $year;
|
print $year;
|
||||||
|
|||||||
@ -168,7 +168,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
|||||||
|
|
||||||
print load_fiche_titre($langs->trans("MembersTypes"));
|
print load_fiche_titre($langs->trans("MembersTypes"));
|
||||||
|
|
||||||
dol_fiche_head('');
|
//dol_fiche_head('');
|
||||||
|
|
||||||
$sql = "SELECT d.rowid, d.libelle, d.cotisation, d.vote";
|
$sql = "SELECT d.rowid, d.libelle, d.cotisation, d.vote";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
||||||
@ -211,7 +211,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_fiche_end();
|
//dol_fiche_end();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Hotbar
|
* Hotbar
|
||||||
@ -679,7 +679,16 @@ if ($rowid > 0)
|
|||||||
print '<br><br><table class="border" width="100%">';
|
print '<br><br><table class="border" width="100%">';
|
||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options['options_'.$key])?$object->array_options['options_'.$key]:''));
|
if (isset($_POST["options_" . $key])) {
|
||||||
|
if (is_array($_POST["options_" . $key])) {
|
||||||
|
// $_POST["options"] is an array but following code expects a comma separated string
|
||||||
|
$value = implode(",", $_POST["options_" . $key]);
|
||||||
|
} else {
|
||||||
|
$value = $_POST["options_" . $key];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$value = $adht->array_options["options_" . $key];
|
||||||
|
}
|
||||||
print '<tr><td width="30%">'.$label.'</td><td>';
|
print '<tr><td width="30%">'.$label.'</td><td>';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|||||||
@ -86,12 +86,12 @@ if ($action == "save" && empty($cancel))
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
$db->commit();
|
$db->commit();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"),null, 'errors');
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -72,7 +72,7 @@ if ($actionsave)
|
|||||||
|
|
||||||
if (! empty($src) && ! dol_is_url($src))
|
if (! empty($src) && ! dol_is_url($src))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorParamMustBeAnUrl"),'errors');
|
setEventMessages($langs->trans("ErrorParamMustBeAnUrl"), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
$errorsaved++;
|
$errorsaved++;
|
||||||
break;
|
break;
|
||||||
@ -104,12 +104,12 @@ if ($actionsave)
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
if (empty($errorsaved)) setEventMessage($langs->trans("Error"),'errors');
|
if (empty($errorsaved)) setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -54,12 +54,12 @@ if ($actionsave)
|
|||||||
if ($i >= 4)
|
if ($i >= 4)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($langs->trans("SaveFailed"), 'errors');
|
setEventMessages($langs->trans("SaveFailed"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,8 +6,8 @@
|
|||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -54,11 +54,11 @@ if ($action == 'updateMask')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,13 +96,13 @@ if ($action == 'specimen')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($module->error,'errors');
|
setEventMessages($module->error, null, 'errors');
|
||||||
dol_syslog($module->error, LOG_ERR);
|
dol_syslog($module->error, LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorModuleNotFound"),'errors');
|
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
|
||||||
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -116,11 +116,11 @@ if ($action == 'set_ASKPRICESUPPLIER_DRAFT_WATERMARK')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,11 +134,11 @@ if ($action == 'set_ASKPRICESUPPLIER_FREE_TEXT')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,11 +150,11 @@ if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ASKPRICESUPPLIER')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,12 +178,12 @@ if ($action == 'setModuleOptions')
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ dol_fiche_head($head, 'general', $langs->trans("CommRequests"), 0, 'askpricesupp
|
|||||||
/*
|
/*
|
||||||
* Module numerotation
|
* Module numerotation
|
||||||
*/
|
*/
|
||||||
print load_fiche_titre($langs->trans("AskPriceSupplierNumberingModules"));
|
print load_fiche_titre($langs->trans("AskPriceSupplierNumberingModules"),'','');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -351,7 +351,7 @@ print "</table><br>\n";
|
|||||||
* Document templates generators
|
* Document templates generators
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("AskPriceSupplierPDFModules"));
|
print load_fiche_titre($langs->trans("AskPriceSupplierPDFModules"),'','');
|
||||||
|
|
||||||
// Load array def with activated templates
|
// Load array def with activated templates
|
||||||
$def = array();
|
$def = array();
|
||||||
@ -513,7 +513,7 @@ print '<br>';
|
|||||||
* Other options
|
* Other options
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
print load_fiche_titre($langs->trans("OtherOptions"));
|
print load_fiche_titre($langs->trans("OtherOptions"),'','');
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print "<table class=\"noborder\" width=\"100%\">";
|
||||||
@ -594,7 +594,7 @@ print '</table>';
|
|||||||
* Directory
|
* Directory
|
||||||
*/
|
*/
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print load_fiche_titre($langs->trans("PathToDocuments"));
|
print load_fiche_titre($langs->trans("PathToDocuments"),'','');
|
||||||
|
|
||||||
print "<table class=\"noborder\" width=\"100%\">\n";
|
print "<table class=\"noborder\" width=\"100%\">\n";
|
||||||
print "<tr class=\"liste_titre\">\n";
|
print "<tr class=\"liste_titre\">\n";
|
||||||
|
|||||||
@ -56,11 +56,11 @@ if ($action == 'set_BANK_CHEQUERECEIPT_FREE_TEXT')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -97,11 +97,11 @@ if ($action == 'setModuleOptions')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'msgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,11 +111,11 @@ if ($action && $action != 'setcoder' && $action != 'setModuleOptions')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ foreach($dirbarcode as $reldir)
|
|||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print load_fiche_titre($langs->trans("BarcodeEncodeModule"));
|
print load_fiche_titre($langs->trans("BarcodeEncodeModule"),'','');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -288,7 +288,7 @@ print "<br>";
|
|||||||
* Autres options
|
* Autres options
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
print load_fiche_titre($langs->trans("OtherOptions"));
|
print load_fiche_titre($langs->trans("OtherOptions"),'','');
|
||||||
|
|
||||||
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
@ -358,7 +358,7 @@ print '<br>';
|
|||||||
// Select barcode numbering module
|
// Select barcode numbering module
|
||||||
if ($conf->produit->enabled)
|
if ($conf->produit->enabled)
|
||||||
{
|
{
|
||||||
print load_fiche_titre($langs->trans("BarCodeNumberManager")." (".$langs->trans("Product").")");
|
print load_fiche_titre($langs->trans("BarCodeNumberManager")." (".$langs->trans("Product").")",'','');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|||||||
@ -85,7 +85,7 @@ if ($action == 'add') {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($db->lasterror(), 'errors');
|
setEventMessages($db->lasterror(), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -121,7 +121,7 @@ if ($action == 'add') {
|
|||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if (! $resql)
|
if (! $resql)
|
||||||
{
|
{
|
||||||
setEventMessage($db->lasterror(), 'errors');
|
setEventMessages($db->lasterror(), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,16 +36,19 @@ $action = GETPOST("action");
|
|||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($action == 'setvalue' && $user->admin)
|
if ($action == 'setvalue' && $user->admin)
|
||||||
{
|
{
|
||||||
$result=dolibarr_set_const($db, "CLICKTODIAL_URL", GETPOST("url"), 'chaine', 0, '', $conf->entity);
|
$result=dolibarr_set_const($db, "CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS", GETPOST("CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS"), 'chaine', 0, '', $conf->entity);
|
||||||
if ($result >= 0)
|
$result=dolibarr_set_const($db, "CLICKTODIAL_URL", GETPOST("CLICKTODIAL_URL"), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
|
if ($result1 >= 0 && $result2 >= 0)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,13 +76,22 @@ $var=true;
|
|||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td width="120">'.$langs->trans("Name").'</td>';
|
print '<td>'.$langs->trans("Name").'</td>';
|
||||||
print '<td>'.$langs->trans("Value").'</td>';
|
print '<td>'.$langs->trans("Value").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td valign="top">';
|
print '<tr '.$bc[$var].'><td>';
|
||||||
|
print $langs->trans("ClickToDialUseTelLink").'</td><td>';
|
||||||
|
print $form->selectyesno("CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS", $conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS, 1).'<br>';
|
||||||
|
print '<br>';
|
||||||
|
print $langs->trans("ClickToDialUseTelLinkDesc");
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td>';
|
||||||
print $langs->trans("DefaultLink").'</td><td>';
|
print $langs->trans("DefaultLink").'</td><td>';
|
||||||
print '<input size="92" type="text" name="url" value="'.$conf->global->CLICKTODIAL_URL.'"><br>';
|
print '<input size="92" type="text" name="CLICKTODIAL_URL"'.($conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS?' disabled="disabled"':'').' value="'.$conf->global->CLICKTODIAL_URL.'"><br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print $langs->trans("ClickToDialUrlDesc").'<br>';
|
print $langs->trans("ClickToDialUrlDesc").'<br>';
|
||||||
print $langs->trans("Example").':<br>http://myphoneserver/mypage?login=__LOGIN__&password=__PASS__&caller=__PHONEFROM__&called=__PHONETO__';
|
print $langs->trans("Example").':<br>http://myphoneserver/mypage?login=__LOGIN__&password=__PASS__&caller=__PHONEFROM__&called=__PHONETO__';
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -64,11 +64,11 @@ if ($action == 'updateMask')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,13 +106,13 @@ else if ($action == 'specimen')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($module->error,'errors');
|
setEventMessages($module->error, null, 'errors');
|
||||||
dol_syslog($module->error, LOG_ERR);
|
dol_syslog($module->error, LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorModuleNotFound"),'errors');
|
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
|
||||||
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -137,12 +137,12 @@ if ($action == 'setModuleOptions')
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,11 +196,11 @@ else if ($action == 'set_COMMANDE_DRAFT_WATERMARK')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,11 +214,11 @@ else if ($action == 'set_ORDER_FREE_TEXT')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,9 +228,9 @@ else if ($action=="setshippableiconinlist") {
|
|||||||
$res = dolibarr_set_const($db, "SHIPPABLE_ORDER_ICON_IN_LIST", $setshippableiconinlist,'yesno',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, "SHIPPABLE_ORDER_ICON_IN_LIST", $setshippableiconinlist,'yesno',0,'',$conf->entity);
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
if (! $error) {
|
if (! $error) {
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
} else {
|
} else {
|
||||||
setEventMessage($langs->trans("Error"), 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -243,11 +243,28 @@ else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Activate ask for warehouse
|
||||||
|
else if ($action == 'set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER')
|
||||||
|
{
|
||||||
|
$res = dolibarr_set_const($db, "WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER",$value,'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,7 +290,7 @@ dol_fiche_head($head, 'general', $langs->trans("Orders"), 0, 'order');
|
|||||||
* Orders Numbering model
|
* Orders Numbering model
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("OrdersNumberingModules"));
|
print load_fiche_titre($langs->trans("OrdersNumberingModules"),'','');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -377,7 +394,7 @@ print "</table><br>\n";
|
|||||||
* Document templates generators
|
* Document templates generators
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("OrdersModelModule"));
|
print load_fiche_titre($langs->trans("OrdersModelModule"),'','');
|
||||||
|
|
||||||
// Load array def with activated templates
|
// Load array def with activated templates
|
||||||
$def = array();
|
$def = array();
|
||||||
@ -540,7 +557,7 @@ print "<br>";
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("OtherOptions"));
|
print load_fiche_titre($langs->trans("OtherOptions"),'','');
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
@ -630,6 +647,36 @@ else
|
|||||||
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").'</td><td> </td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").'</td><td> </td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ask for warehouse during order
|
||||||
|
if ($conf->stock->enabled)
|
||||||
|
{
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td>';
|
||||||
|
print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").'</td><td> </td><td align="center">';
|
||||||
|
if (! empty($conf->use_javascript_ajax))
|
||||||
|
{
|
||||||
|
print ajax_constantonoff('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER))
|
||||||
|
{
|
||||||
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER&value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER&value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td>';
|
||||||
|
print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").'</td><td> </td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
@ -638,7 +685,7 @@ print '<br>';
|
|||||||
* Notifications
|
* Notifications
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("Notifications"));
|
print load_fiche_titre($langs->trans("Notifications"),'','');
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -125,19 +125,19 @@ if ( ($action == 'update' && empty($_POST["cancel"]))
|
|||||||
$error++;
|
$error++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$tmparray=explode(':',$result);
|
$tmparray=explode(':',$result);
|
||||||
setEventMessage($langs->trans('ErrorFileIsInfectedWithAVirus',$tmparray[1]),'errors');
|
setEventMessages($langs->trans('ErrorFileIsInfectedWithAVirus',$tmparray[1]), null, 'errors');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessage($langs->trans("ErrorFailedToSaveFile"),'errors');
|
setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
setEventMessage($langs->trans("ErrorBadImageFormat"),'errors');
|
setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -230,7 +230,7 @@ if ($action == 'addthumb')
|
|||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
setEventMessage($langs->trans("ErrorBadImageFormat"),'errors');
|
setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors');
|
||||||
dol_syslog($langs->transnoentities("ErrorBadImageFormat"),LOG_WARNING);
|
dol_syslog($langs->transnoentities("ErrorBadImageFormat"),LOG_WARNING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -238,7 +238,7 @@ if ($action == 'addthumb')
|
|||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
setEventMessage($langs->trans("ErrorFileDoesNotExists",$_GET["file"]),'errors');
|
setEventMessages($langs->trans("ErrorFileDoesNotExists",$_GET["file"]), null, 'errors');
|
||||||
dol_syslog($langs->transnoentities("ErrorFileDoesNotExists",$_GET["file"]),LOG_WARNING);
|
dol_syslog($langs->transnoentities("ErrorFileDoesNotExists",$_GET["file"]),LOG_WARNING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -380,7 +380,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">';
|
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.jpg">';
|
print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
|
||||||
}
|
}
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -769,7 +769,7 @@ else
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.jpg">';
|
print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
|
||||||
}
|
}
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2013-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -87,11 +87,11 @@ if ($action == 'update')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -55,12 +55,12 @@ if ($action == 'add' || (GETPOST('add') && $action != 'update'))
|
|||||||
|
|
||||||
if (empty($constname))
|
if (empty($constname))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Name")),'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Name")), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if ($constvalue == '')
|
if ($constvalue == '')
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Value")),'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Value")), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ if ($action == 'add' || (GETPOST('add') && $action != 'update'))
|
|||||||
{
|
{
|
||||||
if (dolibarr_set_const($db, $constname, $constvalue, 'chaine', 1, $constnote, $entity) >= 0)
|
if (dolibarr_set_const($db, $constname, $constvalue, 'chaine', 1, $constnote, $entity) >= 0)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("RecordSaved"));
|
setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
|
||||||
$action="";
|
$action="";
|
||||||
$constname="";
|
$constname="";
|
||||||
$constvalue="";
|
$constvalue="";
|
||||||
@ -99,7 +99,7 @@ if (! empty($consts) && $action == 'update')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($nbmodified > 0) setEventMessage($langs->trans("RecordSaved"));
|
if ($nbmodified > 0) setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
|
||||||
$action='';
|
$action='';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ if (! empty($consts) && $action == 'delete')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($nbdeleted > 0) setEventMessage($langs->trans("RecordDeleted"));
|
if ($nbdeleted > 0) setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
|
||||||
$action='';
|
$action='';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ if ($action == 'delete')
|
|||||||
{
|
{
|
||||||
if (dolibarr_del_const($db, $rowid, $entity) >= 0)
|
if (dolibarr_del_const($db, $rowid, $entity) >= 0)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("RecordDeleted"));
|
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
/* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011-2014 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -59,11 +59,11 @@ if ($action == 'updateMask')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,13 +101,13 @@ else if ($action == 'specimen') // For contract
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($obj->error,'errors');
|
setEventMessages($obj->error, $obj->errors, 'errors');
|
||||||
dol_syslog($obj->error, LOG_ERR);
|
dol_syslog($obj->error, LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorModuleNotFound"),'errors');
|
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
|
||||||
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -132,12 +132,12 @@ if ($action == 'setModuleOptions')
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,11 +194,11 @@ else if ($action == 'set_other')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ dol_fiche_head($head, 'contract', $langs->trans("Contracts"), 0, 'contract');
|
|||||||
* Contracts Numbering model
|
* Contracts Numbering model
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("ContractsNumberingModules"));
|
print load_fiche_titre($langs->trans("ContractsNumberingModules"),'','');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -329,7 +329,7 @@ print '</table><br>';
|
|||||||
* Documents models for Contracts
|
* Documents models for Contracts
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("TemplatePDFContracts"));
|
print load_fiche_titre($langs->trans("TemplatePDFContracts"),'','');
|
||||||
|
|
||||||
// Defini tableau def des modeles
|
// Defini tableau def des modeles
|
||||||
$def = array();
|
$def = array();
|
||||||
@ -494,7 +494,7 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set_other">';
|
print '<input type="hidden" name="action" value="set_other">';
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("OtherOptions"));
|
print load_fiche_titre($langs->trans("OtherOptions"),'','');
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
|
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
|
||||||
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
|
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
|
||||||
@ -34,6 +34,7 @@ require '../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||||
|
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
@ -465,6 +466,9 @@ if ($id == 11)
|
|||||||
'fichinter' => $langs->trans('InterventionCard')
|
'fichinter' => $langs->trans('InterventionCard')
|
||||||
);
|
);
|
||||||
if (! empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES)) $elementList["societe"] = $langs->trans('ThirdParty');
|
if (! empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES)) $elementList["societe"] = $langs->trans('ThirdParty');
|
||||||
|
|
||||||
|
complete_elementList_with_modules($elementList);
|
||||||
|
|
||||||
asort($elementList);
|
asort($elementList);
|
||||||
$sourceList = array(
|
$sourceList = array(
|
||||||
'internal' => $langs->trans('Internal'),
|
'internal' => $langs->trans('Internal'),
|
||||||
@ -544,20 +548,20 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
if ($fieldnamekey == 'deductible') $fieldnamekey = 'Deductible';
|
if ($fieldnamekey == 'deductible') $fieldnamekey = 'Deductible';
|
||||||
if ($fieldnamekey == 'sortorder') $fieldnamekey = 'SortOrder';
|
if ($fieldnamekey == 'sortorder') $fieldnamekey = 'SortOrder';
|
||||||
|
|
||||||
setEventMessage($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)),'errors');
|
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Other checks
|
// Other checks
|
||||||
if ($tabname[$id] == MAIN_DB_PREFIX."c_actioncomm" && isset($_POST["type"]) && in_array($_POST["type"],array('system','systemauto'))) {
|
if ($tabname[$id] == MAIN_DB_PREFIX."c_actioncomm" && isset($_POST["type"]) && in_array($_POST["type"],array('system','systemauto'))) {
|
||||||
$ok=0;
|
$ok=0;
|
||||||
setEventMessage($langs->transnoentities('ErrorReservedTypeSystemSystemAuto'),'errors');
|
setEventMessages($langs->transnoentities('ErrorReservedTypeSystemSystemAuto'), null, 'errors');
|
||||||
}
|
}
|
||||||
if (isset($_POST["code"]))
|
if (isset($_POST["code"]))
|
||||||
{
|
{
|
||||||
if ($_POST["code"]=='0')
|
if ($_POST["code"]=='0')
|
||||||
{
|
{
|
||||||
$ok=0;
|
$ok=0;
|
||||||
setEventMessage($langs->transnoentities('ErrorCodeCantContainZero'),'errors');
|
setEventMessages($langs->transnoentities('ErrorCodeCantContainZero'), null, 'errors');
|
||||||
}
|
}
|
||||||
/*if (!is_numeric($_POST['code'])) // disabled, code may not be in numeric base
|
/*if (!is_numeric($_POST['code'])) // disabled, code may not be in numeric base
|
||||||
{
|
{
|
||||||
@ -574,7 +578,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$ok=0;
|
$ok=0;
|
||||||
setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->transnoentities("Country")),'errors');
|
setEventMessages($langs->transnoentities("ErrorFieldRequired",$langs->transnoentities("Country")), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -633,13 +637,13 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result) // Add is ok
|
if ($result) // Add is ok
|
||||||
{
|
{
|
||||||
setEventMessage($langs->transnoentities("RecordSaved"));
|
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
|
||||||
$_POST=array('id'=>$id); // Clean $_POST array, we keep only
|
$_POST=array('id'=>$id); // Clean $_POST array, we keep only
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
|
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
|
||||||
setEventMessage($langs->transnoentities("ErrorRecordAlreadyExists"),'errors');
|
setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
@ -683,7 +687,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if (! $resql)
|
if (! $resql)
|
||||||
{
|
{
|
||||||
setEventMessage($db->error(),'errors');
|
setEventMessage($db->error(), 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
||||||
@ -707,7 +711,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete
|
|||||||
{
|
{
|
||||||
if ($db->errno() == 'DB_ERROR_CHILD_EXISTS')
|
if ($db->errno() == 'DB_ERROR_CHILD_EXISTS')
|
||||||
{
|
{
|
||||||
setEventMessage($langs->transnoentities("ErrorRecordIsUsedByChild"),'errors');
|
setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -61,7 +61,7 @@ if ($action == "save")
|
|||||||
}
|
}
|
||||||
|
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -65,9 +65,9 @@ if ($action == 'updateMask')
|
|||||||
if (isset($res))
|
if (isset($res))
|
||||||
{
|
{
|
||||||
if ($res > 0)
|
if ($res > 0)
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
else
|
else
|
||||||
setEventMessage($langs->trans("Error"), 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,9 +77,9 @@ else if ($action == 'set_SHIPPING_FREE_TEXT')
|
|||||||
$res = dolibarr_set_const($db, "SHIPPING_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, "SHIPPING_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
if ($res > 0)
|
if ($res > 0)
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
else
|
else
|
||||||
setEventMessage($langs->trans("Error"), 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'set_SHIPPING_DRAFT_WATERMARK')
|
else if ($action == 'set_SHIPPING_DRAFT_WATERMARK')
|
||||||
@ -88,9 +88,9 @@ else if ($action == 'set_SHIPPING_DRAFT_WATERMARK')
|
|||||||
$res = dolibarr_set_const($db, "SHIPPING_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, "SHIPPING_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
if ($res > 0)
|
if ($res > 0)
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
else
|
else
|
||||||
setEventMessage($langs->trans("Error"), 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'specimen')
|
else if ($action == 'specimen')
|
||||||
@ -127,13 +127,13 @@ else if ($action == 'specimen')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($module->error, 'errors');
|
setEventMessages($module->error, $module->errors, 'errors');
|
||||||
dol_syslog($module->error, LOG_ERR);
|
dol_syslog($module->error, LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorModuleNotFound"), 'errors');
|
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
|
||||||
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -158,12 +158,12 @@ else if ($action == 'setModuleOptions')
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -60,11 +60,11 @@ if ($action == 'updateMask')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,13 +102,13 @@ else if ($action == 'specimen') // For fiche inter
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($obj->error,'errors');
|
setEventMessages($module->error, $module->errors,'errors');
|
||||||
dol_syslog($obj->error, LOG_ERR);
|
dol_syslog($module->error, LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorModuleNotFound"),'errors');
|
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
|
||||||
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -133,12 +133,12 @@ if ($action == 'setModuleOptions')
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,11 +196,11 @@ else if ($action == 'set_EXPENSEREPORT_FREE_TEXT')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,11 +214,11 @@ else if ($action == 'set_EXPENSEREPORT_DRAFT_WATERMARK')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ dol_fiche_head($head, 'expensereport', $langs->trans("ExpenseReports"), 0, 'trip
|
|||||||
|
|
||||||
// Interventions numbering model
|
// Interventions numbering model
|
||||||
/*
|
/*
|
||||||
print load_fiche_titre($langs->trans("FicheinterNumberingModules"));
|
print load_fiche_titre($langs->trans("FicheinterNumberingModules"),'','');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|||||||
@ -69,11 +69,11 @@ if ($action == 'updateMask')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,13 +111,13 @@ if ($action == 'specimen')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($module->error,'errors');
|
setEventMessages($module->error, $module->errors, 'errors');
|
||||||
dol_syslog($module->error, LOG_ERR);
|
dol_syslog($module->error, LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorModuleNotFound"),'errors');
|
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
|
||||||
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -139,11 +139,11 @@ if ($action == 'setModuleOptions')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,11 +200,11 @@ if ($action == 'setribchq')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,11 +218,11 @@ if ($action == 'set_FACTURE_DRAFT_WATERMARK')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,11 +236,11 @@ if ($action == 'set_INVOICE_FREE_TEXT')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,11 +254,11 @@ if ($action == 'setforcedate')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,11 +272,11 @@ if ($action == 'set_FAC_AUTO_FILLJS')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,7 +302,7 @@ dol_fiche_head($head, 'general', $langs->trans("Invoices"), 0, 'invoice');
|
|||||||
* Numbering module
|
* Numbering module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("BillsNumberingModule"));
|
print load_fiche_titre($langs->trans("BillsNumberingModule"),'','');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -471,7 +471,7 @@ print '</table>';
|
|||||||
* Document templates generators
|
* Document templates generators
|
||||||
*/
|
*/
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print load_fiche_titre($langs->trans("BillsPDFModules"));
|
print load_fiche_titre($langs->trans("BillsPDFModules"),'','');
|
||||||
|
|
||||||
// Load array def with activated templates
|
// Load array def with activated templates
|
||||||
$type='invoice';
|
$type='invoice';
|
||||||
@ -631,7 +631,7 @@ print '</table>';
|
|||||||
* Modes de reglement
|
* Modes de reglement
|
||||||
*/
|
*/
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInInvoice"));
|
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInInvoice"),'','');
|
||||||
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
||||||
@ -726,7 +726,7 @@ print "</form>";
|
|||||||
|
|
||||||
|
|
||||||
print "<br>";
|
print "<br>";
|
||||||
print load_fiche_titre($langs->trans("OtherOptions"));
|
print load_fiche_titre($langs->trans("OtherOptions"),'','');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -805,7 +805,7 @@ print '</table>';
|
|||||||
* Repertoire
|
* Repertoire
|
||||||
*/
|
*/
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print load_fiche_titre($langs->trans("PathToDocuments"));
|
print load_fiche_titre($langs->trans("PathToDocuments"),'','');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">'."\n";
|
print '<table class="noborder" width="100%">'."\n";
|
||||||
print '<tr class="liste_titre">'."\n";
|
print '<tr class="liste_titre">'."\n";
|
||||||
@ -823,7 +823,7 @@ print "</table>\n";
|
|||||||
* Notifications
|
* Notifications
|
||||||
*/
|
*/
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print load_fiche_titre($langs->trans("Notifications"));
|
print load_fiche_titre($langs->trans("Notifications"),'','');
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
|
|||||||
@ -121,11 +121,11 @@ if (GETPOST('save','alpha'))
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ $var=true;
|
|||||||
|
|
||||||
if (empty($conf->use_javascript_ajax))
|
if (empty($conf->use_javascript_ajax))
|
||||||
{
|
{
|
||||||
setEventMessage(array($langs->trans("NotAvailable"), $langs->trans("JavascriptDisabled")), 'errors');
|
setEventMessages(array($langs->trans("NotAvailable"), $langs->trans("JavascriptDisabled")), null, 'errors');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -60,11 +60,11 @@ if ($action == 'updateMask')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,13 +102,13 @@ else if ($action == 'specimen') // For fiche inter
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($obj->error,'errors');
|
setEventMessages($module->error, $module->errors, 'errors');
|
||||||
dol_syslog($obj->error, LOG_ERR);
|
dol_syslog($module->error, LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorModuleNotFound"),'errors');
|
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
|
||||||
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -133,12 +133,12 @@ if ($action == 'setModuleOptions')
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,11 +192,11 @@ else if ($action == 'set_FICHINTER_FREE_TEXT')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -209,11 +209,11 @@ else if ($action == 'set_FICHINTER_DRAFT_WATERMARK')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,11 +226,11 @@ elseif ($action == 'set_FICHINTER_PRINT_PRODUCTS')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ dol_fiche_head($head, 'ficheinter', $langs->trans("Interventions"), 0, 'interven
|
|||||||
|
|
||||||
// Interventions numbering model
|
// Interventions numbering model
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("FicheinterNumberingModules"));
|
print load_fiche_titre($langs->trans("FicheinterNumberingModules"),'','');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -357,7 +357,7 @@ print '</table><br>';
|
|||||||
* Documents models for Interventions
|
* Documents models for Interventions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("TemplatePDFInterventions"));
|
print load_fiche_titre($langs->trans("TemplatePDFInterventions"),'','');
|
||||||
|
|
||||||
// Defini tableau def des modeles
|
// Defini tableau def des modeles
|
||||||
$type='ficheinter';
|
$type='ficheinter';
|
||||||
@ -511,7 +511,7 @@ print "<br>";
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("OtherOptions"));
|
print load_fiche_titre($langs->trans("OtherOptions"),'','');
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
|
|||||||
@ -46,7 +46,7 @@ if ($action == 'set')
|
|||||||
|
|
||||||
if (! $gimcdf && ! file_exists($gimcdf))
|
if (! $gimcdf && ! file_exists($gimcdf))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorFileNotFound",$gimcdf),'errors');
|
setEventMessages($langs->trans("ErrorFileNotFound",$gimcdf), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,11 +57,11 @@ if ($action == 'set')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,6 +37,7 @@ $langs->load("companies");
|
|||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
|
$langs->load("hrm");
|
||||||
|
|
||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|
||||||
@ -46,17 +47,21 @@ $action = GETPOST('action');
|
|||||||
if (! defined("MAIN_MOTD")) define("MAIN_MOTD","");
|
if (! defined("MAIN_MOTD")) define("MAIN_MOTD","");
|
||||||
|
|
||||||
// List of supported permanent search area
|
// List of supported permanent search area
|
||||||
$searchform=array("MAIN_SEARCHFORM_SOCIETE", "MAIN_SEARCHFORM_CONTACT", "MAIN_SEARCHFORM_PRODUITSERVICE", "MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER", "MAIN_SEARCHFORM_ADHERENT", "MAIN_SEARCHFORM_PROJECT");
|
$searchform=array();
|
||||||
$searchformconst=array($conf->global->MAIN_SEARCHFORM_SOCIETE,$conf->global->MAIN_SEARCHFORM_CONTACT,$conf->global->MAIN_SEARCHFORM_PRODUITSERVICE,$conf->global->MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER,$conf->global->MAIN_SEARCHFORM_ADHERENT,$conf->global->MAIN_SEARCHFORM_PROJECT);
|
if (empty($conf->use_javascript_ajax))
|
||||||
$searchformtitle=array($langs->trans("Companies"), $langs->trans("Contacts"), $langs->trans("ProductsAndServices"), $langs->trans("ProductsAndServices").' ('.$langs->trans("SupplierRef").')', $langs->trans("Members"), $langs->trans("Projects"));
|
{
|
||||||
$searchformmodule=array('Module1Name','Module1Name','Module50Name','Module50Name','Module310Name','Module400Name');
|
$searchform=array("MAIN_SEARCHFORM_SOCIETE", "MAIN_SEARCHFORM_CONTACT", "MAIN_SEARCHFORM_PRODUITSERVICE", "MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER", "MAIN_SEARCHFORM_ADHERENT", "MAIN_SEARCHFORM_PROJECT", "MAIN_SEARCHFORM_EMPLOYEE");
|
||||||
|
$searchformconst=array($conf->global->MAIN_SEARCHFORM_SOCIETE,$conf->global->MAIN_SEARCHFORM_CONTACT,$conf->global->MAIN_SEARCHFORM_PRODUITSERVICE,$conf->global->MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER,$conf->global->MAIN_SEARCHFORM_ADHERENT,$conf->global->MAIN_SEARCHFORM_PROJECT,$conf->global->MAIN_SEARCHFORM_EMPLOYEE);
|
||||||
|
$searchformtitle=array($langs->trans("Companies"), $langs->trans("Contacts"), $langs->trans("ProductsAndServices"), $langs->trans("ProductsAndServices").' ('.$langs->trans("SupplierRef").')', $langs->trans("Members"), $langs->trans("Projects"), $langs->trans("Users"));
|
||||||
|
$searchformmodule=array('Module1Name','Module1Name','Module50Name','Module50Name','Module310Name','Module400Name');
|
||||||
|
}
|
||||||
|
|
||||||
if ($action == 'update')
|
if ($action == 'update')
|
||||||
{
|
{
|
||||||
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", $_POST["main_lang_default"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", $_POST["main_lang_default"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["main_multilangs"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["main_multilangs"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity);
|
||||||
|
dolibarr_set_const($db, "MAIN_SIZE_SHORTLISTE_LIMIT", $_POST["main_size_shortliste_limit"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", $_POST["MAIN_BUTTON_HIDE_UNAUTHORIZED"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", $_POST["MAIN_BUTTON_HIDE_UNAUTHORIZED"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity);
|
||||||
@ -76,13 +81,16 @@ if ($action == 'update')
|
|||||||
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_BACKTITLE1', $conf->entity);
|
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_BACKTITLE1', $conf->entity);
|
||||||
else dolibarr_set_const($db, 'THEME_ELDY_BACKTITLE1', join(',',colorStringToArray(GETPOST('THEME_ELDY_BACKTITLE1'),array())),'chaine',0,'',$conf->entity);
|
else dolibarr_set_const($db, 'THEME_ELDY_BACKTITLE1', join(',',colorStringToArray(GETPOST('THEME_ELDY_BACKTITLE1'),array())),'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
|
/*
|
||||||
dolibarr_set_const($db, "MAIN_SEARCHFORM_CONTACT", $_POST["MAIN_SEARCHFORM_CONTACT"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_SEARCHFORM_CONTACT", $_POST["MAIN_SEARCHFORM_CONTACT"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_SEARCHFORM_SOCIETE", $_POST["MAIN_SEARCHFORM_SOCIETE"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_SEARCHFORM_SOCIETE", $_POST["MAIN_SEARCHFORM_SOCIETE"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_SEARCHFORM_PRODUITSERVICE", $_POST["MAIN_SEARCHFORM_PRODUITSERVICE"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_SEARCHFORM_PRODUITSERVICE", $_POST["MAIN_SEARCHFORM_PRODUITSERVICE"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER",$_POST["MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER",$_POST["MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_SEARCHFORM_ADHERENT", $_POST["MAIN_SEARCHFORM_ADHERENT"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_SEARCHFORM_ADHERENT", $_POST["MAIN_SEARCHFORM_ADHERENT"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_SEARCHFORM_PROJECT", $_POST["MAIN_SEARCHFORM_PROJECT"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_SEARCHFORM_PROJECT", $_POST["MAIN_SEARCHFORM_PROJECT"],'chaine',0,'',$conf->entity);
|
||||||
|
dolibarr_set_const($db, "MAIN_SEARCHFORM_EMPLOYEE", $_POST["MAIN_SEARCHFORM_EMPLOYEE"],'chaine',0,'',$conf->entity);
|
||||||
|
*/
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", $_POST["MAIN_HELPCENTER_DISABLELINK"],'chaine',0,'',0); // Param for all entities
|
dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", $_POST["MAIN_HELPCENTER_DISABLELINK"],'chaine',0,'',0); // Param for all entities
|
||||||
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr($_POST["main_motd"]),'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr($_POST["main_motd"]),'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr($_POST["main_home"]),'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr($_POST["main_home"]),'chaine',0,'',$conf->entity);
|
||||||
@ -161,19 +169,22 @@ if ($action == 'edit') // Edit
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
// Liste des zone de recherche permanantes supportees
|
// Liste des zone de recherche permanantes supportees
|
||||||
print '<table summary="search" class="noborder" width="100%">';
|
if (! empty($searchform))
|
||||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("PermanentLeftSearchForm").'</td><td colspan="2">'.$langs->trans("Activated").'</td></tr>';
|
|
||||||
$var=True;
|
|
||||||
foreach ($searchform as $key => $value)
|
|
||||||
{
|
{
|
||||||
$var=!$var;
|
print '<table summary="search" class="noborder" width="100%">';
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$searchformtitle[$key].'</td><td colspan="2">';
|
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("PermanentLeftSearchForm").'</td><td colspan="2">'.$langs->trans("Activated").'</td></tr>';
|
||||||
print $form->selectyesno($searchform[$key],$searchformconst[$key],1);
|
$var=True;
|
||||||
print '</td></tr>';
|
foreach ($searchform as $key => $value)
|
||||||
|
{
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td width="35%">'.$searchformtitle[$key].'</td><td colspan="2">';
|
||||||
|
print $form->selectyesno($searchform[$key],$searchformconst[$key],1);
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
print '</table>';
|
||||||
|
print '<br>';
|
||||||
}
|
}
|
||||||
print '</table>';
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
print '<table summary="edit" class="noborder" width="100%">';
|
print '<table summary="edit" class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
|
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
|
||||||
@ -204,6 +215,12 @@ if ($action == 'edit') // Edit
|
|||||||
print '<td width="20"> </td>';
|
print '<td width="20"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
// Max size of short lists on customer card
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeShortList").'</td><td><input class="flat" name="main_size_shortliste_limit" size="4" value="' . $conf->global->MAIN_SIZE_SHORTLISTE_LIMIT . '"></td>';
|
||||||
|
print '<td width="20"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
// Disable javascript and ajax
|
// Disable javascript and ajax
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableJavascript").'</td><td>';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableJavascript").'</td><td>';
|
||||||
@ -348,20 +365,23 @@ else // Show
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
// Liste des zone de recherches permanentes supportees
|
// List of search forms to show
|
||||||
print '<table class="noborder" width="100%">';
|
if (! empty($searchform))
|
||||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("PermanentLeftSearchForm").'</td><td>'.$langs->trans("Activated").'</td><td> </td></tr>';
|
|
||||||
$var=true;
|
|
||||||
foreach ($searchform as $key => $value)
|
|
||||||
{
|
{
|
||||||
$var=!$var;
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$searchformtitle[$key].'</td><td>'.yn($searchformconst[$key]).'</td>';
|
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("PermanentLeftSearchForm").'</td><td>'.$langs->trans("Activated").'</td><td> </td></tr>';
|
||||||
print '<td align="left">'.$langs->trans("IfModuleEnabled",$langs->transnoentitiesnoconv($searchformmodule[$key]));
|
$var=true;
|
||||||
print '</td></tr>';
|
foreach ($searchform as $key => $value)
|
||||||
|
{
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td width="35%">'.$searchformtitle[$key].'</td><td>'.yn($searchformconst[$key]).'</td>';
|
||||||
|
print '<td align="left">';
|
||||||
|
if (! empty($searchformmodule[$key])) print $langs->trans("IfModuleEnabled",$langs->transnoentitiesnoconv($searchformmodule[$key]));
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
print '</table>';
|
||||||
|
print '<br>';
|
||||||
}
|
}
|
||||||
print '</table>';
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
$var=true;
|
$var=true;
|
||||||
@ -385,6 +405,11 @@ else // Show
|
|||||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeList").'</td><td>' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '</td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeList").'</td><td>' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '</td>';
|
||||||
print '<td width="20"> </td>';
|
print '<td width="20"> </td>';
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeShortList").'</td><td>' . $conf->global->MAIN_SIZE_SHORTLISTE_LIMIT . '</td>';
|
||||||
|
print '<td width="20"> </td>';
|
||||||
|
print "</tr>";
|
||||||
|
|
||||||
// Disable javascript/ajax
|
// Disable javascript/ajax
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|||||||
@ -63,7 +63,7 @@ if ($action == 'setvalue' && $user->admin)
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -89,7 +89,7 @@ $head = ldap_prepare_head();
|
|||||||
// Test si fonction LDAP actives
|
// Test si fonction LDAP actives
|
||||||
if (! function_exists("ldap_connect"))
|
if (! function_exists("ldap_connect"))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("LDAPFunctionsNotAvailableOnPHP"),'errors');
|
setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_fiche_head($head, 'ldap', $langs->trans("LDAPSetup"));
|
dol_fiche_head($head, 'ldap', $langs->trans("LDAPSetup"));
|
||||||
|
|||||||
@ -77,7 +77,7 @@ if ($action == 'setvalue' && $user->admin)
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -102,7 +102,7 @@ $head = ldap_prepare_head();
|
|||||||
// Test si fonction LDAP actives
|
// Test si fonction LDAP actives
|
||||||
if (! function_exists("ldap_connect"))
|
if (! function_exists("ldap_connect"))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("LDAPFunctionsNotAvailableOnPHP"),'errors');
|
setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_fiche_head($head, 'contacts', $langs->trans("LDAPSetup"));
|
dol_fiche_head($head, 'contacts', $langs->trans("LDAPSetup"));
|
||||||
|
|||||||
@ -68,7 +68,7 @@ if ($action == 'setvalue' && $user->admin)
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -93,7 +93,7 @@ $head = ldap_prepare_head();
|
|||||||
// Test si fonction LDAP actives
|
// Test si fonction LDAP actives
|
||||||
if (! function_exists("ldap_connect"))
|
if (! function_exists("ldap_connect"))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("LDAPFunctionsNotAvailableOnPHP"),'errors');
|
setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_fiche_head($head, 'groups', $langs->trans("LDAPSetup"));
|
dol_fiche_head($head, 'groups', $langs->trans("LDAPSetup"));
|
||||||
|
|||||||
@ -92,7 +92,7 @@ if ($action == 'setvalue' && $user->admin)
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -117,7 +117,7 @@ $head = ldap_prepare_head();
|
|||||||
// Test si fonction LDAP actives
|
// Test si fonction LDAP actives
|
||||||
if (! function_exists("ldap_connect"))
|
if (! function_exists("ldap_connect"))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("LDAPFunctionsNotAvailableOnPHP"),'errors');
|
setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_fiche_head($head, 'members', $langs->trans("LDAPSetup"));
|
dol_fiche_head($head, 'members', $langs->trans("LDAPSetup"));
|
||||||
|
|||||||
@ -78,7 +78,7 @@ if ($action == 'setvalue' && $user->admin)
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -103,7 +103,7 @@ $head = ldap_prepare_head();
|
|||||||
// Test si fonction LDAP actives
|
// Test si fonction LDAP actives
|
||||||
if (! function_exists("ldap_connect"))
|
if (! function_exists("ldap_connect"))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("LDAPFunctionsNotAvailableOnPHP"),'errors');
|
setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_fiche_head($head, 'users', $langs->trans("LDAPSetup"));
|
dol_fiche_head($head, 'users', $langs->trans("LDAPSetup"));
|
||||||
@ -427,7 +427,7 @@ if (function_exists("ldap_connect"))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($ldap->error, 'errors');
|
setEventMessages($ldap->error, $ldap->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|||||||
@ -43,7 +43,7 @@ if ($action == 'update')
|
|||||||
|| $_POST["MAIN_MAX_DECIMALS_SHOWN"] > $MAXDEC)
|
|| $_POST["MAIN_MAX_DECIMALS_SHOWN"] > $MAXDEC)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessage($langs->trans("ErrorDecimalLargerThanAreForbidden",$MAXDEC), 'errors');
|
setEventMessages($langs->trans("ErrorDecimalLargerThanAreForbidden",$MAXDEC), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST["MAIN_MAX_DECIMALS_UNIT"] < 0
|
if ($_POST["MAIN_MAX_DECIMALS_UNIT"] < 0
|
||||||
@ -52,7 +52,7 @@ if ($action == 'update')
|
|||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessage($langs->trans("ErrorNegativeValueNotAllowed"), 'errors');
|
setEventMessages($langs->trans("ErrorNegativeValueNotAllowed"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST["MAIN_ROUNDING_RULE_TOT"])
|
if ($_POST["MAIN_ROUNDING_RULE_TOT"])
|
||||||
@ -61,7 +61,7 @@ if ($action == 'update')
|
|||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessage($langs->trans("ErrorMAIN_ROUNDING_RULE_TOTCanMAIN_MAX_DECIMALS_TOT"), 'errors');
|
setEventMessages($langs->trans("ErrorMAIN_ROUNDING_RULE_TOTCanMAIN_MAX_DECIMALS_TOT"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -58,11 +58,11 @@ if ($action == 'updateMask')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,11 +75,11 @@ if ($action == 'set_DELIVERY_FREE_TEXT')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,13 +117,13 @@ if ($action == 'specimen')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($module->error,'errors');
|
setEventMessages($module->error, $module->errors, 'errors');
|
||||||
dol_syslog($module->error, LOG_ERR);
|
dol_syslog($module->error, LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorModuleNotFound"),'errors');
|
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
|
||||||
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -148,12 +148,12 @@ if ($action == 'setModuleOptions')
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,7 +237,7 @@ dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup"));
|
|||||||
* Livraison numbering model
|
* Livraison numbering model
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("DeliveryOrderNumberingModules"));
|
print load_fiche_titre($langs->trans("DeliveryOrderNumberingModules"),'','');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -340,7 +340,7 @@ print '</table>';
|
|||||||
* Documents Models for delivery
|
* Documents Models for delivery
|
||||||
*/
|
*/
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print load_fiche_titre($langs->trans("DeliveryOrderModel"));
|
print load_fiche_titre($langs->trans("DeliveryOrderModel"),'','');
|
||||||
|
|
||||||
// Defini tableau def de modele
|
// Defini tableau def de modele
|
||||||
$type="delivery";
|
$type="delivery";
|
||||||
@ -487,7 +487,7 @@ print '</table>';
|
|||||||
* Autres Options
|
* Autres Options
|
||||||
*/
|
*/
|
||||||
print "<br>";
|
print "<br>";
|
||||||
print load_fiche_titre($langs->trans("OtherOptions"));
|
print load_fiche_titre($langs->trans("OtherOptions"),'','');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|||||||
@ -61,11 +61,11 @@ if ($action == 'update')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -64,12 +64,12 @@ if ($action == 'setvalue')
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -65,11 +65,11 @@ if ($action == 'update' || $action == 'add')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ if (($action == 'testsubscribe' || $action == 'testunsubscribe') && ! empty($con
|
|||||||
if (! isValidEmail($email))
|
if (! isValidEmail($email))
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
setEventMessage($langs->trans("ErrorBadEMail",$email),'errors');
|
setEventMessages($langs->trans("ErrorBadEMail",$email), null, 'errors');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -118,11 +118,11 @@ if (($action == 'testsubscribe' || $action == 'testunsubscribe') && ! empty($con
|
|||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessage($mailmanspip->error,'errors');
|
setEventMessages($mailmanspip->error,$mailmanspip->errors,'errors');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("MailmanCreationSuccess"));
|
setEventMessages($langs->trans("MailmanCreationSuccess"), null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($action == 'testunsubscribe')
|
if ($action == 'testunsubscribe')
|
||||||
@ -131,11 +131,11 @@ if (($action == 'testsubscribe' || $action == 'testunsubscribe') && ! empty($con
|
|||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessage($mailmanspip->error,'errors');
|
setEventMessages($mailmanspip->error,$mailmanspip->errors,'errors');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("MailmanDeletionSuccess"));
|
setEventMessages($langs->trans("MailmanDeletionSuccess"), null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -156,12 +156,15 @@ print load_fiche_titre($langs->trans("MailmanSpipSetup"),$linkback,'title_setup'
|
|||||||
|
|
||||||
$head = mailmanspip_admin_prepare_head();
|
$head = mailmanspip_admin_prepare_head();
|
||||||
|
|
||||||
dol_fiche_head($head, 'mailman', $langs->trans("Setup"), 0, 'user');
|
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
||||||
{
|
{
|
||||||
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
|
|
||||||
|
dol_fiche_head($head, 'mailman', $langs->trans("Setup"), 0, 'user');
|
||||||
|
|
||||||
//$link=img_picto($langs->trans("Active"),'tick').' ';
|
//$link=img_picto($langs->trans("Active"),'tick').' ';
|
||||||
$link='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_MAILMAN">';
|
$link='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_MAILMAN">';
|
||||||
//$link.=$langs->trans("Disable");
|
//$link.=$langs->trans("Disable");
|
||||||
@ -200,21 +203,30 @@ if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
|||||||
});
|
});
|
||||||
</script>';
|
</script>';
|
||||||
|
|
||||||
form_constantes($constantes,1);
|
form_constantes($constantes,2);
|
||||||
|
|
||||||
print '*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
|
print '*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
|
||||||
print '%LISTE%, %MAILMAN_ADMINPW%, %EMAIL% <br>';
|
print '%LISTE%, %MAILMAN_ADMINPW%, %EMAIL% <br>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
|
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Update").'" name="update"></div>';
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
dol_fiche_head($head, 'mailman', $langs->trans("Setup"), 0, 'user');
|
||||||
|
|
||||||
$link='<a href="'.$_SERVER["PHP_SELF"].'?action=set&value=1&name=ADHERENT_USE_MAILMAN">';
|
$link='<a href="'.$_SERVER["PHP_SELF"].'?action=set&value=1&name=ADHERENT_USE_MAILMAN">';
|
||||||
//$link.=img_$langs->trans("Activate")
|
//$link.=img_$langs->trans("Activate")
|
||||||
$link.=img_picto($langs->trans("Disabled"),'switch_off');
|
$link.=img_picto($langs->trans("Disabled"),'switch_off');
|
||||||
$link.='</a>';
|
$link.='</a>';
|
||||||
print load_fiche_titre($langs->trans('MailmanTitle'), $link,'');
|
print load_fiche_titre($langs->trans('MailmanTitle'), $link,'');
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_fiche_end();
|
|
||||||
|
|
||||||
if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -123,7 +123,7 @@ if (! empty($_POST['removedfile']) || ! empty($_POST['removedfilehtml']))
|
|||||||
$result = dol_delete_file($pathtodelete,1);
|
$result = dol_delete_file($pathtodelete,1);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("FileWasRemoved"), $filetodelete);
|
setEventMessages(array($langs->trans("FileWasRemoved"), $filetodelete), null, 'mesgs');
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||||
$formmail = new FormMail($db);
|
$formmail = new FormMail($db);
|
||||||
@ -169,19 +169,19 @@ if (($action == 'send' || $action == 'sendhtml') && ! GETPOST('addfile') && ! GE
|
|||||||
|
|
||||||
if (empty($_POST["frommail"]))
|
if (empty($_POST["frommail"]))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("MailFrom")),'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("MailFrom")), null, 'errors');
|
||||||
$action='test';
|
$action='test';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if (empty($sendto))
|
if (empty($sendto))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("MailTo")),'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("MailTo")), null, 'errors');
|
||||||
$action='test';
|
$action='test';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
// Le message est-il en html
|
// Is the message in HTML?
|
||||||
$msgishtml=0; // Message is not HTML
|
$msgishtml=0; // Message is not HTML
|
||||||
if ($action == 'sendhtml') $msgishtml=1; // Force message to HTML
|
if ($action == 'sendhtml') $msgishtml=1; // Force message to HTML
|
||||||
|
|
||||||
@ -209,11 +209,11 @@ if (($action == 'send' || $action == 'sendhtml') && ! GETPOST('addfile') && ! GE
|
|||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("MailSuccessfulySent",$mailfile->getValidAddress($email_from,2),$mailfile->getValidAddress($sendto,2)));
|
setEventMessages($langs->trans("MailSuccessfulySent",$mailfile->getValidAddress($email_from,2),$mailfile->getValidAddress($sendto,2)), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ResultKo").'<br>'.$mailfile->error.' '.$result,'errors');
|
setEventMessages($langs->trans("ResultKo").'<br>'.$mailfile->error.' '.$result, null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
$action='';
|
$action='';
|
||||||
@ -677,7 +677,7 @@ else
|
|||||||
$errormsg .= ' - '.$mail->error;
|
$errormsg .= ' - '.$mail->error;
|
||||||
}
|
}
|
||||||
|
|
||||||
setEventMessage($errormsg, 'errors');
|
setEventMessages($errormsg, null, 'errors');
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -102,8 +102,7 @@ if ($action == 'update' && empty($_POST["cancel"]))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
//TODO: Translate
|
setEventMessages($langs->trans("FailedToInitializeMenu").' '.$key, null, 'errors');
|
||||||
setEventMessage('Failed to initialize menu '.$key.'.', 'errors');
|
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -78,16 +78,16 @@ if ($action == 'update')
|
|||||||
$result=$menu->update($user);
|
$result=$menu->update($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("RecordModifiedSuccessfully"));
|
setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($menu->error, 'errors');
|
setEventMessages($menu->error, $menu->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($menu->error, 'errors');
|
setEventMessages($menu->error, $menu->errors, 'errors');
|
||||||
}
|
}
|
||||||
$_GET["menuId"] = $_POST['menuId'];
|
$_GET["menuId"] = $_POST['menuId'];
|
||||||
$action = "edit";
|
$action = "edit";
|
||||||
@ -135,37 +135,37 @@ if ($action == 'add')
|
|||||||
$error=0;
|
$error=0;
|
||||||
if (! $error && ! $_POST['menu_handler'])
|
if (! $error && ! $_POST['menu_handler'])
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("MenuHandler")), 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("MenuHandler")), null, 'errors');
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if (! $error && ! $_POST['type'])
|
if (! $error && ! $_POST['type'])
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Type")), 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Type")), null, 'errors');
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if (! $error && ! $_POST['url'])
|
if (! $error && ! $_POST['url'])
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Url")), 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("Url")), null, 'errors');
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if (! $error && ! $_POST['titre'])
|
if (! $error && ! $_POST['titre'])
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Title")), 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("Title")), null, 'errors');
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if (! $error && $_POST['menuId'] && $_POST['type'] == 'top')
|
if (! $error && $_POST['menuId'] && $_POST['type'] == 'top')
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorTopMenuMustHaveAParentWithId0"), 'errors');
|
setEventMessages($langs->trans("ErrorTopMenuMustHaveAParentWithId0"), null, 'errors');
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if (! $error && empty($_POST['menuId']) && $_POST['type'] == 'left')
|
if (! $error && empty($_POST['menuId']) && $_POST['type'] == 'left')
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorLeftMenuMustHaveAParentId"), 'errors');
|
setEventMessages($langs->trans("ErrorLeftMenuMustHaveAParentId"), null, 'errors');
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
@ -204,7 +204,7 @@ if ($action == 'add')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
setEventMessage($menu->error, 'errors');
|
setEventMessages($menu->error, $menu->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -222,7 +222,7 @@ if ($action == 'confirm_delete' && $_POST["confirm"] == 'yes')
|
|||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
setEventMessage($langs->trans("MenuDeleted"));
|
setEventMessages($langs->trans("MenuDeleted"), null, 'mesgs');
|
||||||
llxFooter();
|
llxFooter();
|
||||||
exit ;
|
exit ;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -186,7 +186,7 @@ elseif ($action == 'confirm_delete' && $confirm == 'yes')
|
|||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
|
|
||||||
setEventMessage($langs->trans("MenuDeleted"));
|
setEventMessages($langs->trans("MenuDeleted"), null, 'mesgs');
|
||||||
|
|
||||||
header("Location: ".DOL_URL_ROOT.'/admin/menus/index.php?menu_handler='.$menu_handler);
|
header("Location: ".DOL_URL_ROOT.'/admin/menus/index.php?menu_handler='.$menu_handler);
|
||||||
exit ;
|
exit ;
|
||||||
@ -359,7 +359,7 @@ if ($conf->use_javascript_ajax)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
setEventMessage($langs->trans("ErrorFeatureNeedJavascript"), 'errors');
|
setEventMessages($langs->trans("ErrorFeatureNeedJavascript"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
@ -43,6 +43,21 @@ if (! $user->admin)
|
|||||||
|
|
||||||
$specialtostring=array(0=>'common', 1=>'interfaces', 2=>'other', 3=>'functional', 4=>'marketplace');
|
$specialtostring=array(0=>'common', 1=>'interfaces', 2=>'other', 3=>'functional', 4=>'marketplace');
|
||||||
|
|
||||||
|
$familyinfo=array(
|
||||||
|
'hr'=>array('position'=>'001', 'label'=>$langs->trans("ModuleFamilyHr")),
|
||||||
|
'crm'=>array('position'=>'006', 'label'=>$langs->trans("ModuleFamilyCrm")),
|
||||||
|
'financial'=>array('position'=>'009', 'label'=>$langs->trans("ModuleFamilyFinancial")),
|
||||||
|
'products'=>array('position'=>'012', 'label'=>$langs->trans("ModuleFamilyProducts")),
|
||||||
|
'projects'=>array('position'=>'015', 'label'=>$langs->trans("ModuleFamilyProjects")),
|
||||||
|
'ecm'=>array('position'=>'018', 'label'=>$langs->trans("ModuleFamilyECM")),
|
||||||
|
'technic'=>array('position'=>'021', 'label'=>$langs->trans("ModuleFamilyTechnic")),
|
||||||
|
'portal'=>array('position'=>'040', 'label'=>$langs->trans("ModuleFamilyPortal")),
|
||||||
|
'interface'=>array('position'=>'050', 'label'=>$langs->trans("ModuleFamilyInterface")),
|
||||||
|
'base'=>array('position'=>'060', 'label'=>$langs->trans("ModuleFamilyBase")),
|
||||||
|
'other'=>array('position'=>'100', 'label'=>$langs->trans("ModuleFamilyOther")),
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -51,7 +66,7 @@ $specialtostring=array(0=>'common', 1=>'interfaces', 2=>'other', 3=>'functional'
|
|||||||
if ($action == 'set' && $user->admin)
|
if ($action == 'set' && $user->admin)
|
||||||
{
|
{
|
||||||
$result=activateModule($value);
|
$result=activateModule($value);
|
||||||
if ($result) setEventMessage($result, 'errors');
|
if ($result) setEventMessages($result, null, 'errors');
|
||||||
header("Location: modules.php?mode=".$mode);
|
header("Location: modules.php?mode=".$mode);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -59,7 +74,7 @@ if ($action == 'set' && $user->admin)
|
|||||||
if ($action == 'reset' && $user->admin)
|
if ($action == 'reset' && $user->admin)
|
||||||
{
|
{
|
||||||
$result=unActivateModule($value);
|
$result=unActivateModule($value);
|
||||||
if ($result) setEventMessage($result, 'errors');
|
if ($result) setEventMessages($result, null, 'errors');
|
||||||
header("Location: modules.php?mode=".$mode);
|
header("Location: modules.php?mode=".$mode);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -110,7 +125,7 @@ foreach ($modulesdir as $dir)
|
|||||||
if (! empty($modNameLoaded[$modName]))
|
if (! empty($modNameLoaded[$modName]))
|
||||||
{
|
{
|
||||||
$mesg="Error: Module ".$modName." was found twice: Into ".$modNameLoaded[$modName]." and ".$dir.". You probably have an old file on your disk.<br>";
|
$mesg="Error: Module ".$modName." was found twice: Into ".$modNameLoaded[$modName]." and ".$dir.". You probably have an old file on your disk.<br>";
|
||||||
setEventMessage($mesg, 'warnings');
|
setEventMessages($mesg, null, 'warnings');
|
||||||
dol_syslog($mesg, LOG_ERR);
|
dol_syslog($mesg, LOG_ERR);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -124,22 +139,20 @@ foreach ($modulesdir as $dir)
|
|||||||
$objMod = new $modName($db);
|
$objMod = new $modName($db);
|
||||||
$modNameLoaded[$modName]=$dir;
|
$modNameLoaded[$modName]=$dir;
|
||||||
|
|
||||||
if ($objMod->numero > 0)
|
if (! $objMod->numero > 0)
|
||||||
{
|
{
|
||||||
$j = $objMod->numero;
|
dol_syslog('The module descriptor '.$modName.' must have a numero property', LOG_ERR);
|
||||||
}
|
}
|
||||||
else
|
$j = $objMod->numero;
|
||||||
{
|
|
||||||
$j = 1000 + $i;
|
|
||||||
}
|
|
||||||
|
|
||||||
$modulequalified=1;
|
$modulequalified=1;
|
||||||
|
|
||||||
// We discard modules according to features level (PS: if module is activated we always show it)
|
// We discard modules according to features level (PS: if module is activated we always show it)
|
||||||
$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod)));
|
$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod)));
|
||||||
if ($objMod->version == 'development' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 2))) $modulequalified=0;
|
if ($objMod->version == 'development' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 2))) $modulequalified=0;
|
||||||
if ($objMod->version == 'experimental' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 1))) $modulequalified=0;
|
if ($objMod->version == 'experimental' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 1))) $modulequalified=0;
|
||||||
// We discard modules according to property disabled
|
if (preg_match('/deprecated/', $objMod->version) && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL >= 0))) $modulequalified=0;
|
||||||
|
// We discard modules according to property disabled
|
||||||
if (! empty($objMod->hidden)) $modulequalified=false;
|
if (! empty($objMod->hidden)) $modulequalified=false;
|
||||||
|
|
||||||
// Define array $categ with categ with at least one qualified module
|
// Define array $categ with categ with at least one qualified module
|
||||||
@ -147,13 +160,19 @@ foreach ($modulesdir as $dir)
|
|||||||
{
|
{
|
||||||
$modules[$i] = $objMod;
|
$modules[$i] = $objMod;
|
||||||
$filename[$i]= $modName;
|
$filename[$i]= $modName;
|
||||||
$orders[$i] = $objMod->family."_".$j; // Sort by family, then by module number
|
|
||||||
|
$special = $objMod->special;
|
||||||
|
$familykey = $objMod->family;
|
||||||
|
|
||||||
|
if ($special == 1) $familykey='interface';
|
||||||
|
|
||||||
|
$orders[$i] = $familyinfo[$familykey]['position']."_".$familykey."_".$j; // Sort by family, then by module number
|
||||||
$dirmod[$i] = $dir;
|
$dirmod[$i] = $dir;
|
||||||
// Set categ[$i]
|
// Set categ[$i]
|
||||||
$special = isset($specialtostring[$objMod->special])?$specialtostring[$objMod->special]:'unknown';
|
$specialstring = isset($specialtostring[$special])?$specialtostring[$special]:'unknown';
|
||||||
if ($objMod->version == 'development' || $objMod->version == 'experimental') $special='expdev';
|
if ($objMod->version == 'development' || $objMod->version == 'experimental') $specialstring='expdev';
|
||||||
if (isset($categ[$special])) $categ[$special]++; // Array of all different modules categories
|
if (isset($categ[$specialstring])) $categ[$specialstring]++; // Array of all different modules categories
|
||||||
else $categ[$special]=1;
|
else $categ[$specialstring]=1;
|
||||||
$j++;
|
$j++;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -197,9 +216,9 @@ print load_fiche_titre($langs->trans("ModulesSetup"),$moreinfo,'title_setup');
|
|||||||
// Start to show page
|
// Start to show page
|
||||||
if (empty($mode)) $mode='common';
|
if (empty($mode)) $mode='common';
|
||||||
if ($mode==='common') print $langs->trans("ModulesDesc")."<br>\n";
|
if ($mode==='common') print $langs->trans("ModulesDesc")."<br>\n";
|
||||||
if ($mode==='other') print $langs->trans("ModulesSpecialDesc")."<br>\n";
|
//if ($mode==='other') print $langs->trans("ModulesSpecialDesc")."<br>\n";
|
||||||
if ($mode==='interfaces') print $langs->trans("ModulesInterfaceDesc")."<br>\n";
|
//if ($mode==='interfaces') print $langs->trans("ModulesInterfaceDesc")."<br>\n";
|
||||||
if ($mode==='functional') print $langs->trans("ModulesJobDesc")."<br>\n";
|
//if ($mode==='functional') print $langs->trans("ModulesJobDesc")."<br>\n";
|
||||||
if ($mode==='marketplace') print $langs->trans("ModulesMarketPlaceDesc")."<br>\n";
|
if ($mode==='marketplace') print $langs->trans("ModulesMarketPlaceDesc")."<br>\n";
|
||||||
if ($mode==='expdev') print $langs->trans("ModuleFamilyExperimental")."<br>\n";
|
if ($mode==='expdev') print $langs->trans("ModuleFamilyExperimental")."<br>\n";
|
||||||
|
|
||||||
@ -213,11 +232,12 @@ $categidx='common'; // Main
|
|||||||
if (! empty($categ[$categidx]))
|
if (! empty($categ[$categidx]))
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
|
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
|
||||||
$head[$h][1] = $langs->trans("ModulesCommon");
|
$head[$h][1] = $langs->trans("AvailableModules");
|
||||||
$head[$h][2] = 'common';
|
$head[$h][2] = 'common';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
$categidx='other'; // Other
|
$categidx='other'; // Other
|
||||||
if (! empty($categ[$categidx]))
|
if (! empty($categ[$categidx]))
|
||||||
{
|
{
|
||||||
@ -244,6 +264,7 @@ if (! empty($categ[$categidx]))
|
|||||||
$head[$h][2] = 'functional';
|
$head[$h][2] = 'functional';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
$categidx='expdev';
|
$categidx='expdev';
|
||||||
if (! empty($categ[$categidx]))
|
if (! empty($categ[$categidx]))
|
||||||
@ -287,28 +308,19 @@ if ($mode != 'marketplace')
|
|||||||
|
|
||||||
$oldfamily='';
|
$oldfamily='';
|
||||||
|
|
||||||
$familylib=array(
|
|
||||||
'base'=>$langs->trans("ModuleFamilyBase"),
|
|
||||||
'crm'=>$langs->trans("ModuleFamilyCrm"),
|
|
||||||
'products'=>$langs->trans("ModuleFamilyProducts"),
|
|
||||||
'hr'=>$langs->trans("ModuleFamilyHr"),
|
|
||||||
'projects'=>$langs->trans("ModuleFamilyProjects"),
|
|
||||||
'financial'=>$langs->trans("ModuleFamilyFinancial"),
|
|
||||||
'ecm'=>$langs->trans("ModuleFamilyECM"),
|
|
||||||
'technic'=>$langs->trans("ModuleFamilyTechnic"),
|
|
||||||
'other'=>$langs->trans("ModuleFamilyOther")
|
|
||||||
);
|
|
||||||
|
|
||||||
foreach ($orders as $key => $value)
|
foreach ($orders as $key => $value)
|
||||||
{
|
{
|
||||||
$tab=explode('_',$value);
|
$tab=explode('_',$value);
|
||||||
$family=$tab[0]; $numero=$tab[1];
|
$familypos=$tab[0]; $familykey=$tab[1]; $numero=$tab[2];
|
||||||
|
|
||||||
$modName = $filename[$key];
|
$modName = $filename[$key];
|
||||||
$objMod = $modules[$key];
|
$objMod = $modules[$key];
|
||||||
|
|
||||||
|
$special = $objMod->special;
|
||||||
|
|
||||||
//print $objMod->name." - ".$key." - ".$objMod->special.' - '.$objMod->version."<br>";
|
//print $objMod->name." - ".$key." - ".$objMod->special.' - '.$objMod->version."<br>";
|
||||||
if (($mode != (isset($specialtostring[$objMod->special])?$specialtostring[$objMod->special]:'unknown') && $mode != 'expdev')
|
//if (($mode != (isset($specialtostring[$special])?$specialtostring[$special]:'unknown') && $mode != 'expdev')
|
||||||
|
if (($special >= 4 && $mode != 'expdev')
|
||||||
|| ($mode == 'expdev' && $objMod->version != 'development' && $objMod->version != 'experimental')) continue; // Discard if not for current tab
|
|| ($mode == 'expdev' && $objMod->version != 'development' && $objMod->version != 'experimental')) continue; // Discard if not for current tab
|
||||||
|
|
||||||
if (! $objMod->getName())
|
if (! $objMod->getName())
|
||||||
@ -329,28 +341,27 @@ if ($mode != 'marketplace')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Print a separator if we change family
|
// Print a separator if we change family
|
||||||
//print "<tr><td>xx".$oldfamily."-".$family."-".$atleastoneforfamily."<br></td><tr>";
|
//print "<tr><td>xx".$oldfamily."-".$familykey."-".$atleastoneforfamily."<br></td><tr>";
|
||||||
//if ($oldfamily && $family!=$oldfamily && $atleastoneforfamily) {
|
//if ($oldfamily && $familykey!=$oldfamily && $atleastoneforfamily) {
|
||||||
if ($family!=$oldfamily)
|
if ($familykey!=$oldfamily)
|
||||||
{
|
{
|
||||||
print '<tr class="liste_titre">'."\n";
|
print '<tr class="liste_titre">'."\n";
|
||||||
print '<td colspan="5">';
|
print '<td colspan="5">';
|
||||||
$familytext=empty($familylib[$family])?$family:$familylib[$family];
|
$familytext=empty($familyinfo[$familykey]['label'])?$familykey:$familyinfo[$familykey]['label'];
|
||||||
print $familytext;
|
print $familytext;
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print '<td align="right">'.$langs->trans("SetupShort").'</td>'."\n";
|
print '<td align="right">'.$langs->trans("SetupShort").'</td>'."\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$atleastoneforfamily=0;
|
$atleastoneforfamily=0;
|
||||||
//print "<tr><td>yy".$oldfamily."-".$family."-".$atleastoneforfamily."<br></td><tr>";
|
//print "<tr><td>yy".$oldfamily."-".$familykey."-".$atleastoneforfamily."<br></td><tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$atleastoneforfamily++;
|
$atleastoneforfamily++;
|
||||||
|
|
||||||
if ($family!=$oldfamily)
|
if ($familykey!=$oldfamily)
|
||||||
{
|
{
|
||||||
$familytext=empty($familylib[$family])?$family:$familylib[$family];
|
$familytext=empty($familyinfo[$familykey]['label'])?$familykey:$familyinfo[$familykey]['label'];
|
||||||
//print $familytext;
|
$oldfamily=$familykey;
|
||||||
$oldfamily=$family;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.org>
|
* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -93,13 +93,13 @@ if ($action == 'setvalue' && $user->admin)
|
|||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
|
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
|
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,10 +132,12 @@ print '<td>'.$langs->trans("Value").'</td>';
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td>';
|
print '<tr '.$bc[$var].'><td>';
|
||||||
print $langs->trans("NotificationEMailFrom").'</td><td>';
|
print $langs->trans("NotificationEMailFrom").'</td>';
|
||||||
|
print '<td>';
|
||||||
print '<input size="32" type="email" name="email_from" value="'.$conf->global->NOTIFICATION_EMAIL_FROM.'">';
|
print '<input size="32" type="email" name="email_from" value="'.$conf->global->NOTIFICATION_EMAIL_FROM.'">';
|
||||||
if (! empty($conf->global->NOTIFICATION_EMAIL_FROM) && ! isValidEmail($conf->global->NOTIFICATION_EMAIL_FROM)) print ' '.img_warning($langs->trans("ErrorBadEMail"));
|
if (! empty($conf->global->NOTIFICATION_EMAIL_FROM) && ! isValidEmail($conf->global->NOTIFICATION_EMAIL_FROM)) print ' '.img_warning($langs->trans("ErrorBadEMail"));
|
||||||
print '</td></tr>';
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -150,8 +152,7 @@ if ($conf->societe->enabled)
|
|||||||
print '<td>'.$langs->trans("Module").'</td>';
|
print '<td>'.$langs->trans("Module").'</td>';
|
||||||
print '<td>'.$langs->trans("Code").'</td>';
|
print '<td>'.$langs->trans("Code").'</td>';
|
||||||
print '<td>'.$langs->trans("Label").'</td>';
|
print '<td>'.$langs->trans("Label").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("NbOfTargetedContacts").'</td>';
|
//print '<td align="right">'.$langs->trans("NbOfTargetedContacts").'</td>';
|
||||||
print '<td>'.'</td>';
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Load array of available notifications
|
// Load array of available notifications
|
||||||
@ -173,10 +174,10 @@ if ($conf->societe->enabled)
|
|||||||
print '<td>'.$elementLabel.'</td>';
|
print '<td>'.$elementLabel.'</td>';
|
||||||
print '<td>'.$notifiedevent['code'].'</td>';
|
print '<td>'.$notifiedevent['code'].'</td>';
|
||||||
print '<td>'.$label.'</td>';
|
print '<td>'.$label.'</td>';
|
||||||
print '<td align="right">';
|
/*print '<td align="right">';
|
||||||
$tmparray = $notify->getNotificationsArray($notifiedevent['code'], 0);
|
$tmparray = $notify->getNotificationsArray($notifiedevent['code'], 0);
|
||||||
print count($tmparray);
|
print count($tmparray);
|
||||||
print '</td>';
|
print '</td>';*/
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -54,11 +54,11 @@ if ($action == 'updateMask')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -81,12 +81,12 @@ if ($action == "set")
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -59,11 +59,11 @@ if ($action == 'updateMask')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,13 +101,13 @@ if ($action == 'specimen')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($module->error,'errors');
|
setEventMessages($module->error, $module->errors, 'errors');
|
||||||
dol_syslog($module->error, LOG_ERR);
|
dol_syslog($module->error, LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorModuleNotFound"),'errors');
|
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
|
||||||
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -121,11 +121,11 @@ if ($action == 'set_PROPALE_DRAFT_WATERMARK')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,11 +139,11 @@ if ($action == 'set_PROPOSAL_FREE_TEXT')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,11 +155,11 @@ if ($action == 'setdefaultduration')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,11 +171,11 @@ if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,12 +199,12 @@ if ($action == 'setModuleOptions')
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -270,7 +270,7 @@ dol_fiche_head($head, 'general', $langs->trans("Proposals"), 0, 'propal');
|
|||||||
/*
|
/*
|
||||||
* Module numerotation
|
* Module numerotation
|
||||||
*/
|
*/
|
||||||
print load_fiche_titre($langs->trans("ProposalsNumberingModules"));
|
print load_fiche_titre($langs->trans("ProposalsNumberingModules"),'','');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -374,7 +374,7 @@ print "</table><br>\n";
|
|||||||
* Document templates generators
|
* Document templates generators
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("ProposalsPDFModules"));
|
print load_fiche_titre($langs->trans("ProposalsPDFModules"),'','');
|
||||||
|
|
||||||
// Load array def with activated templates
|
// Load array def with activated templates
|
||||||
$def = array();
|
$def = array();
|
||||||
@ -536,7 +536,7 @@ print '<br>';
|
|||||||
* Other options
|
* Other options
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
print load_fiche_titre($langs->trans("OtherOptions"));
|
print load_fiche_titre($langs->trans("OtherOptions"),'','');
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print "<table class=\"noborder\" width=\"100%\">";
|
||||||
@ -643,7 +643,7 @@ print '</table>';
|
|||||||
* Directory
|
* Directory
|
||||||
*/
|
*/
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print load_fiche_titre($langs->trans("PathToDocuments"));
|
print load_fiche_titre($langs->trans("PathToDocuments"),'','');
|
||||||
|
|
||||||
print "<table class=\"noborder\" width=\"100%\">\n";
|
print "<table class=\"noborder\" width=\"100%\">\n";
|
||||||
print "<tr class=\"liste_titre\">\n";
|
print "<tr class=\"liste_titre\">\n";
|
||||||
@ -658,7 +658,7 @@ print "</table>\n<br>";
|
|||||||
* Notifications
|
* Notifications
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("Notifications"));
|
print load_fiche_titre($langs->trans("Notifications"),'','');
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
|
|||||||
@ -44,12 +44,12 @@ if (GETPOST("action") == 'set_proxy')
|
|||||||
{
|
{
|
||||||
if (GETPOST("MAIN_USE_CONNECT_TIMEOUT") && ! is_numeric(GETPOST("MAIN_USE_CONNECT_TIMEOUT")))
|
if (GETPOST("MAIN_USE_CONNECT_TIMEOUT") && ! is_numeric(GETPOST("MAIN_USE_CONNECT_TIMEOUT")))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorValueMustBeInteger"),'errors');
|
setEventMessages($langs->trans("ErrorValueMustBeInteger"), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if (GETPOST("MAIN_USE_RESPONSE_TIMEOUT") && ! is_numeric(GETPOST("MAIN_USE_RESPONSE_TIMEOUT")))
|
if (GETPOST("MAIN_USE_RESPONSE_TIMEOUT") && ! is_numeric(GETPOST("MAIN_USE_RESPONSE_TIMEOUT")))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorValueMustBeInteger"),'errors');
|
setEventMessages($langs->trans("ErrorValueMustBeInteger"), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ if (GETPOST("action") == 'set_proxy')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("RecordModifiedSuccessfully"));
|
setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -60,11 +60,11 @@ if ($action == 'update')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,6 +83,8 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
|
|
||||||
|
dol_fiche_head();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Params
|
* Params
|
||||||
*/
|
*/
|
||||||
@ -109,10 +111,13 @@ foreach ($list as $key)
|
|||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '</form>';
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
print '<br /><div style="text-align:center"><input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"></div>';
|
print '</form>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
|
print '<div style="text-align:center"><input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"></div>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -135,7 +135,7 @@ if ($action == 'activate_encryptdbpassconf')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans('InstrucToEncodePass',dol_encode($dolibarr_main_db_pass)),'warnings');
|
setEventMessages($langs->trans('InstrucToEncodePass',dol_encode($dolibarr_main_db_pass)), null, 'warnings');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ($action == 'disable_encryptdbpassconf')
|
else if ($action == 'disable_encryptdbpassconf')
|
||||||
@ -152,7 +152,7 @@ else if ($action == 'disable_encryptdbpassconf')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans('InstrucToClearPass',$dolibarr_main_db_pass),'warnings');
|
setEventMessages($langs->trans('InstrucToClearPass',$dolibarr_main_db_pass), null, 'warnings');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -86,7 +86,7 @@ else if ($action == 'updateform')
|
|||||||
$res4=dolibarr_set_const($db, "MAIN_UMASK", $_POST["MAIN_UMASK"],'chaine',0,'',$conf->entity);
|
$res4=dolibarr_set_const($db, "MAIN_UMASK", $_POST["MAIN_UMASK"],'chaine',0,'',$conf->entity);
|
||||||
$res5=dolibarr_set_const($db, "MAIN_ANTIVIRUS_COMMAND", $_POST["MAIN_ANTIVIRUS_COMMAND"],'chaine',0,'',$conf->entity);
|
$res5=dolibarr_set_const($db, "MAIN_ANTIVIRUS_COMMAND", $_POST["MAIN_ANTIVIRUS_COMMAND"],'chaine',0,'',$conf->entity);
|
||||||
$res6=dolibarr_set_const($db, "MAIN_ANTIVIRUS_PARAM", $_POST["MAIN_ANTIVIRUS_PARAM"],'chaine',0,'',$conf->entity);
|
$res6=dolibarr_set_const($db, "MAIN_ANTIVIRUS_PARAM", $_POST["MAIN_ANTIVIRUS_PARAM"],'chaine',0,'',$conf->entity);
|
||||||
if ($res3 && $res4 && $res5 && $res6) setEventMessage($langs->trans("RecordModifiedSuccessfully"));
|
if ($res3 && $res4 && $res5 && $res6) setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -97,8 +97,8 @@ else if ($action == 'delete')
|
|||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
$file = $conf->admin->dir_temp . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$file = $conf->admin->dir_temp . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
$ret=dol_delete_file($file);
|
$ret=dol_delete_file($file);
|
||||||
if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
|
if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
|
||||||
else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
|
else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors');
|
||||||
Header('Location: '.$_SERVER["PHP_SELF"]);
|
Header('Location: '.$_SERVER["PHP_SELF"]);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,7 +76,7 @@ else if ($action == 'updateform')
|
|||||||
{
|
{
|
||||||
$res1=dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", $_POST["MAIN_APPLICATION_TITLE"],'chaine',0,'',$conf->entity);
|
$res1=dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", $_POST["MAIN_APPLICATION_TITLE"],'chaine',0,'',$conf->entity);
|
||||||
$res2=dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", $_POST["MAIN_SESSION_TIMEOUT"],'chaine',0,'',$conf->entity);
|
$res2=dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", $_POST["MAIN_SESSION_TIMEOUT"],'chaine',0,'',$conf->entity);
|
||||||
if ($res1 && $res2) setEventMessage($langs->trans("RecordModifiedSuccessfully"));
|
if ($res1 && $res2) setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -88,25 +88,25 @@ if ($action == 'send' && ! $_POST['cancel'])
|
|||||||
|
|
||||||
if (! empty($formsms->error))
|
if (! empty($formsms->error))
|
||||||
{
|
{
|
||||||
setEventMessage($formsms->error,'errors');
|
setEventMessages($formsms->error, $formsms->errors, 'errors');
|
||||||
$action='test';
|
$action='test';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if (empty($body))
|
if (empty($body))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Message")),'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Message")), null, 'errors');
|
||||||
$action='test';
|
$action='test';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if (empty($smsfrom) || ! str_replace('+','',$smsfrom))
|
if (empty($smsfrom) || ! str_replace('+','',$smsfrom))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("SmsFrom")),'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("SmsFrom")), null, 'errors');
|
||||||
$action='test';
|
$action='test';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if (empty($sendto) || ! str_replace('+','',$sendto))
|
if (empty($sendto) || ! str_replace('+','',$sendto))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("SmsTo")),'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("SmsTo")), null, 'errors');
|
||||||
$action='test';
|
$action='test';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
@ -123,11 +123,11 @@ if ($action == 'send' && ! $_POST['cancel'])
|
|||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SmsSuccessfulySent",$smsfrom,$sendto));
|
setEventMessages($langs->trans("SmsSuccessfulySent",$smsfrom,$sendto), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ResultKo"),'errors');
|
setEventMessages($langs->trans("ResultKo"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
$action='';
|
$action='';
|
||||||
|
|||||||
@ -54,28 +54,30 @@ if ($action == 'update' || $action == 'add')
|
|||||||
$constname=GETPOST("constname");
|
$constname=GETPOST("constname");
|
||||||
$constvalue=GETPOST("constvalue");
|
$constvalue=GETPOST("constvalue");
|
||||||
|
|
||||||
if (($constname=='ADHERENT_CARD_TYPE' || $constname=='ADHERENT_ETIQUETTE_TYPE') && $constvalue == -1) $constvalue='';
|
// Action mise a jour ou ajout d'une constante
|
||||||
if ($constname=='ADHERENT_LOGIN_NOT_REQUIRED') // Invert choice
|
if ($action == 'update' || $action == 'add')
|
||||||
{
|
{
|
||||||
if ($constvalue) $constvalue=0;
|
foreach($_POST['constname'] as $key => $val)
|
||||||
else $constvalue=1;
|
{
|
||||||
}
|
$constname=$_POST["constname"][$key];
|
||||||
|
$constvalue=$_POST["constvalue"][$key];
|
||||||
|
$consttype=$_POST["consttype"][$key];
|
||||||
|
$constnote=$_POST["constnote"][$key];
|
||||||
|
|
||||||
if (in_array($constname,array('ADHERENT_MAIL_VALID','ADHERENT_MAIL_COTIS','ADHERENT_MAIL_RESIL'))) $constvalue=$_POST["constvalue".$constname];
|
$res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity);
|
||||||
$consttype=$_POST["consttype"];
|
|
||||||
$constnote=GETPOST("constnote");
|
if (! $res > 0) $error++;
|
||||||
$res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity);
|
}
|
||||||
|
|
||||||
if (! $res > 0) $error++;
|
if (! $error)
|
||||||
|
{
|
||||||
if (! $error)
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
{
|
}
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
else
|
||||||
}
|
{
|
||||||
else
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
{
|
}
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Action activation d'un sous module du module adherent
|
// Action activation d'un sous module du module adherent
|
||||||
@ -115,7 +117,6 @@ print load_fiche_titre($langs->trans("MailmanSpipSetup"),$linkback,'title_setup'
|
|||||||
|
|
||||||
$head = mailmanspip_admin_prepare_head();
|
$head = mailmanspip_admin_prepare_head();
|
||||||
|
|
||||||
dol_fiche_head($head, 'spip', $langs->trans("Setup"), 0, 'user');
|
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
@ -124,6 +125,10 @@ $var=true;
|
|||||||
*/
|
*/
|
||||||
if (! empty($conf->global->ADHERENT_USE_SPIP))
|
if (! empty($conf->global->ADHERENT_USE_SPIP))
|
||||||
{
|
{
|
||||||
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
|
|
||||||
|
dol_fiche_head($head, 'spip', $langs->trans("Setup"), 0, 'user');
|
||||||
|
|
||||||
//$link=img_picto($langs->trans("Active"),'tick').' ';
|
//$link=img_picto($langs->trans("Active"),'tick').' ';
|
||||||
$link='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_SPIP">';
|
$link='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_SPIP">';
|
||||||
//$link.=$langs->trans("Disable");
|
//$link.=$langs->trans("Disable");
|
||||||
@ -139,21 +144,28 @@ if (! empty($conf->global->ADHERENT_USE_SPIP))
|
|||||||
|
|
||||||
print load_fiche_titre($langs->trans('SPIPTitle'), $link, '');
|
print load_fiche_titre($langs->trans('SPIPTitle'), $link, '');
|
||||||
print '<br>';
|
print '<br>';
|
||||||
form_constantes($constantes);
|
|
||||||
print '<br>';
|
form_constantes($constantes,2);
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
|
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Update").'" name="update"></div>';
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
dol_fiche_head($head, 'spip', $langs->trans("Setup"), 0, 'user');
|
||||||
|
|
||||||
$link='<a href="'.$_SERVER["PHP_SELF"].'?action=set&value=1&name=ADHERENT_USE_SPIP">';
|
$link='<a href="'.$_SERVER["PHP_SELF"].'?action=set&value=1&name=ADHERENT_USE_SPIP">';
|
||||||
//$link.=$langs->trans("Activate");
|
//$link.=$langs->trans("Activate");
|
||||||
$link.=img_picto($langs->trans("Disabled"),'switch_off');
|
$link.=img_picto($langs->trans("Disabled"),'switch_off');
|
||||||
$link.='</a>';
|
$link.='</a>';
|
||||||
print load_fiche_titre($langs->trans('SPIPTitle'), $link, '');
|
print load_fiche_titre($langs->trans('SPIPTitle'), $link, '');
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dol_fiche_end();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -96,12 +96,12 @@ if($action)
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,58 +141,75 @@ $var=true;
|
|||||||
|
|
||||||
$found=0;
|
$found=0;
|
||||||
|
|
||||||
|
$var=!$var;
|
||||||
|
print "<tr ".$bc[$var].">";
|
||||||
|
print '<td width="60%">'.$langs->trans("DeStockOnBill").'</td>';
|
||||||
|
print '<td width="160" align="right">';
|
||||||
if (! empty($conf->facture->enabled))
|
if (! empty($conf->facture->enabled))
|
||||||
{
|
{
|
||||||
$var=!$var;
|
print "<form method=\"post\" action=\"stock.php\">";
|
||||||
print "<tr ".$bc[$var].">";
|
|
||||||
print '<td width="60%">'.$langs->trans("DeStockOnBill").'</td>';
|
|
||||||
print '<td width="160" align="right">';
|
|
||||||
print "<form method=\"post\" action=\"stock.php\">";
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_BILL\">";
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_BILL\">";
|
||||||
print $form->selectyesno("STOCK_CALCULATE_ON_BILL",$conf->global->STOCK_CALCULATE_ON_BILL,1,$disabled);
|
print $form->selectyesno("STOCK_CALCULATE_ON_BILL",$conf->global->STOCK_CALCULATE_ON_BILL,1,$disabled);
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||||
print "</form>\n</td>\n</tr>\n";
|
print "</form>\n";
|
||||||
$found++;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module30Name"));
|
||||||
|
}
|
||||||
|
print "</td>\n</tr>\n";
|
||||||
|
$found++;
|
||||||
|
|
||||||
|
$var=!$var;
|
||||||
|
print "<tr ".$bc[$var].">";
|
||||||
|
print '<td width="60%">'.$langs->trans("DeStockOnValidateOrder").'</td>';
|
||||||
|
print '<td width="160" align="right">';
|
||||||
if (! empty($conf->commande->enabled))
|
if (! empty($conf->commande->enabled))
|
||||||
{
|
{
|
||||||
$var=!$var;
|
print "<form method=\"post\" action=\"stock.php\">";
|
||||||
print "<tr ".$bc[$var].">";
|
|
||||||
print '<td width="60%">'.$langs->trans("DeStockOnValidateOrder").'</td>';
|
|
||||||
print '<td width="160" align="right">';
|
|
||||||
print "<form method=\"post\" action=\"stock.php\">";
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_VALIDATE_ORDER\">";
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_VALIDATE_ORDER\">";
|
||||||
print $form->selectyesno("STOCK_CALCULATE_ON_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER,1,$disabled);
|
print $form->selectyesno("STOCK_CALCULATE_ON_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER,1,$disabled);
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||||
print "</form>\n</td>\n</tr>\n";
|
print "</form>\n";
|
||||||
$found++;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module25Name"));
|
||||||
|
}
|
||||||
|
print "</td>\n</tr>\n";
|
||||||
|
$found++;
|
||||||
|
|
||||||
|
//if (! empty($conf->expedition->enabled))
|
||||||
|
//{
|
||||||
|
$var=!$var;
|
||||||
|
print "<tr ".$bc[$var].">";
|
||||||
|
print '<td width="60%">'.$langs->trans("DeStockOnShipment").'</td>';
|
||||||
|
print '<td width="160" align="right">';
|
||||||
if (! empty($conf->expedition->enabled))
|
if (! empty($conf->expedition->enabled))
|
||||||
{
|
{
|
||||||
$var=!$var;
|
|
||||||
print "<tr ".$bc[$var].">";
|
|
||||||
print '<td width="60%">'.$langs->trans("DeStockOnShipment").'</td>';
|
|
||||||
print '<td width="160" align="right">';
|
|
||||||
print "<form method=\"post\" action=\"stock.php\">";
|
print "<form method=\"post\" action=\"stock.php\">";
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SHIPMENT\">";
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SHIPMENT\">";
|
||||||
print $form->selectyesno("STOCK_CALCULATE_ON_SHIPMENT",$conf->global->STOCK_CALCULATE_ON_SHIPMENT,1,$disabled);
|
print $form->selectyesno("STOCK_CALCULATE_ON_SHIPMENT",$conf->global->STOCK_CALCULATE_ON_SHIPMENT,1,$disabled);
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||||
print "</form>\n</td>\n</tr>\n";
|
print "</form>\n";
|
||||||
$found++;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module80Name"));
|
||||||
|
}
|
||||||
|
print "</td>\n</tr>\n";
|
||||||
|
$found++;
|
||||||
|
|
||||||
if (! $found)
|
/*if (! $found)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
print '<td colspan="2">'.$langs->trans("NoModueToManageStockDecrease").'</td>';
|
print '<td colspan="2">'.$langs->trans("NoModuleToManageStockDecrease").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}*/
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
@ -208,57 +225,74 @@ $var=true;
|
|||||||
|
|
||||||
$found=0;
|
$found=0;
|
||||||
|
|
||||||
|
$var=!$var;
|
||||||
|
print "<tr ".$bc[$var].">";
|
||||||
|
print '<td width="60%">'.$langs->trans("ReStockOnBill").'</td>';
|
||||||
|
print '<td width="160" align="right">';
|
||||||
if (! empty($conf->fournisseur->enabled))
|
if (! empty($conf->fournisseur->enabled))
|
||||||
{
|
{
|
||||||
$var=!$var;
|
print "<form method=\"post\" action=\"stock.php\">";
|
||||||
print "<tr ".$bc[$var].">";
|
|
||||||
print '<td width="60%">'.$langs->trans("ReStockOnBill").'</td>';
|
|
||||||
print '<td width="160" align="right">';
|
|
||||||
print "<form method=\"post\" action=\"stock.php\">";
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SUPPLIER_BILL\">";
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SUPPLIER_BILL\">";
|
||||||
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_BILL",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL,1,$disabled);
|
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_BILL",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL,1,$disabled);
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||||
print "</form>\n</td>\n</tr>\n";
|
print "</form>\n";
|
||||||
$found++;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module40Name"));
|
||||||
|
}
|
||||||
|
print "</td>\n</tr>\n";
|
||||||
|
$found++;
|
||||||
|
|
||||||
|
|
||||||
|
$var=!$var;
|
||||||
|
print "<tr ".$bc[$var].">";
|
||||||
|
print '<td width="60%">'.$langs->trans("ReStockOnValidateOrder").'</td>';
|
||||||
|
print '<td width="160" align="right">';
|
||||||
if (! empty($conf->fournisseur->enabled))
|
if (! empty($conf->fournisseur->enabled))
|
||||||
{
|
{
|
||||||
$var=!$var;
|
print "<form method=\"post\" action=\"stock.php\">";
|
||||||
print "<tr ".$bc[$var].">";
|
|
||||||
print '<td width="60%">'.$langs->trans("ReStockOnValidateOrder").'</td>';
|
|
||||||
print '<td width="160" align="right">';
|
|
||||||
print "<form method=\"post\" action=\"stock.php\">";
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER\">";
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER\">";
|
||||||
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER,1,$disabled);
|
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER,1,$disabled);
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||||
print "</form>\n</td>\n</tr>\n";
|
print "</form>\n";
|
||||||
$found++;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module40Name"));
|
||||||
|
}
|
||||||
|
print "</td>\n</tr>\n";
|
||||||
|
$found++;
|
||||||
|
|
||||||
|
$var=!$var;
|
||||||
|
print "<tr ".$bc[$var].">";
|
||||||
|
print '<td width="60%">'.$langs->trans("ReStockOnDispatchOrder").'</td>';
|
||||||
|
print '<td width="160" align="right">';
|
||||||
if (! empty($conf->fournisseur->enabled))
|
if (! empty($conf->fournisseur->enabled))
|
||||||
{
|
{
|
||||||
$var=!$var;
|
print "<form method=\"post\" action=\"stock.php\">";
|
||||||
print "<tr ".$bc[$var].">";
|
|
||||||
print '<td width="60%">'.$langs->trans("ReStockOnDispatchOrder").'</td>';
|
|
||||||
print '<td width="160" align="right">';
|
|
||||||
print "<form method=\"post\" action=\"stock.php\">";
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER\">";
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER\">";
|
||||||
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER,1,$disabled);
|
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER,1,$disabled);
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||||
print "</form>\n</td>\n</tr>\n";
|
print "</form>\n";
|
||||||
$found++;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module40Name"));
|
||||||
|
}
|
||||||
|
print "</td>\n</tr>\n";
|
||||||
|
$found++;
|
||||||
|
|
||||||
if (! $found)
|
/*if (! $found)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
print '<td colspan="2">'.$langs->trans("NoModueToManageStockIncrease").'</td>';
|
print '<td colspan="2">'.$langs->trans("NoModueToManageStockIncrease").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}*/
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -63,11 +63,11 @@ if ($action == 'updateMask')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,13 +106,13 @@ if ($action == 'specimen') // For invoices
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($module->error,'errors');
|
setEventMessages($module->error, $module->errors, 'errors');
|
||||||
dol_syslog($module->error, LOG_ERR);
|
dol_syslog($module->error, LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorModuleNotFound"),'errors');
|
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
|
||||||
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -174,11 +174,11 @@ if ($action == 'set_SUPPLIER_INVOICE_FREE_TEXT')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,7 +205,7 @@ dol_fiche_head($head, 'invoice', $langs->trans("Suppliers"), 0, 'company');
|
|||||||
|
|
||||||
// Supplier invoice numbering module
|
// Supplier invoice numbering module
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("SuppliersInvoiceNumberingModel"));
|
print load_fiche_titre($langs->trans("SuppliersInvoiceNumberingModel"),'','');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -311,7 +311,7 @@ print '</table><br>';
|
|||||||
* Modeles documents for supplier invoices
|
* Modeles documents for supplier invoices
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("BillsPDFModules"));
|
print load_fiche_titre($langs->trans("BillsPDFModules"),'','');
|
||||||
|
|
||||||
// Defini tableau def de modele
|
// Defini tableau def de modele
|
||||||
$def = array();
|
$def = array();
|
||||||
@ -453,7 +453,7 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set_SUPPLIER_INVOICE_FREE_TEXT">';
|
print '<input type="hidden" name="action" value="set_SUPPLIER_INVOICE_FREE_TEXT">';
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("OtherOptions"));
|
print load_fiche_titre($langs->trans("OtherOptions"),'','');
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
@ -487,7 +487,7 @@ print '</form>';
|
|||||||
* Notifications
|
* Notifications
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("Notifications"));
|
print load_fiche_titre($langs->trans("Notifications"),'','');
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -64,11 +64,11 @@ if ($action == 'updateMask')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,13 +107,13 @@ else if ($action == 'specimen') // For orders
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($module->error,'errors');
|
setEventMessages($module->error, $module->errors, 'errors');
|
||||||
dol_syslog($module->error, LOG_ERR);
|
dol_syslog($module->error, LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorModuleNotFound"),'errors');
|
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
|
||||||
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -221,7 +221,7 @@ dol_fiche_head($head, 'order', $langs->trans("Suppliers"), 0, 'company');
|
|||||||
|
|
||||||
// Supplier order numbering module
|
// Supplier order numbering module
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("OrdersNumberingModules"));
|
print load_fiche_titre($langs->trans("OrdersNumberingModules"),'','');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -325,7 +325,7 @@ print '</table><br>';
|
|||||||
* Documents models for supplier orders
|
* Documents models for supplier orders
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("OrdersModelModule"));
|
print load_fiche_titre($langs->trans("OrdersModelModule"),'','');
|
||||||
|
|
||||||
// Defini tableau def de modele
|
// Defini tableau def de modele
|
||||||
$def = array();
|
$def = array();
|
||||||
@ -464,7 +464,7 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set_SUPPLIER_ORDER_OTHER">';
|
print '<input type="hidden" name="action" value="set_SUPPLIER_ORDER_OTHER">';
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("OtherOptions"));
|
print load_fiche_titre($langs->trans("OtherOptions"),'','');
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
@ -512,7 +512,7 @@ print '</form>';
|
|||||||
* Notifications
|
* Notifications
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("Notifications"));
|
print load_fiche_titre($langs->trans("Notifications"),'','');
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
|
|||||||
@ -119,12 +119,12 @@ if ($action == 'set')
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($error, 'errors');
|
setEventMessages($error, $errors, 'errors');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,11 +140,11 @@ if ($action == 'setlevel')
|
|||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,11 +25,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
$langs->load("help");
|
$langs->load("help");
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
|
|
||||||
|
$youuselaststable = 0;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
@ -42,9 +46,54 @@ print load_fiche_titre("Dolibarr",'','title_setup');
|
|||||||
|
|
||||||
print '<div style="padding-left: 30px;">'.img_picto_common('', 'dolibarr_box.png','height="120"').'</div>';
|
print '<div style="padding-left: 30px;">'.img_picto_common('', 'dolibarr_box.png','height="120"').'</div>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||||
|
|
||||||
print $langs->trans("Version").' / '.$langs->trans("DolibarrLicense").':';
|
print $langs->trans("Version").' / '.$langs->trans("DolibarrLicense").':';
|
||||||
print '<ul>';
|
print '<ul>';
|
||||||
print '<li>'.DOL_VERSION.' / <a href="http://www.gnu.org/copyleft/gpl.html">GNU-GPL v3+</a></li>';
|
print '<li><strong>'.DOL_VERSION.'</strong>';
|
||||||
|
|
||||||
|
$result = getURLContent('http://sourceforge.net/projects/dolibarr/rss');
|
||||||
|
//var_dump($result['content']);
|
||||||
|
$sfurl = simplexml_load_string($result['content']);
|
||||||
|
if ($sfurl)
|
||||||
|
{
|
||||||
|
$title=$sfurl->channel[0]->item[0]->title;
|
||||||
|
|
||||||
|
function word_limiter($text, $limit = 30, $chars = '0123456789.')
|
||||||
|
{
|
||||||
|
if (strlen( $text ) > $limit)
|
||||||
|
{
|
||||||
|
$words = str_word_count($text, 2, $chars);
|
||||||
|
$words = array_reverse($words, TRUE);
|
||||||
|
foreach($words as $length => $word) {
|
||||||
|
if ($length + strlen( $word ) >= $limit)
|
||||||
|
{
|
||||||
|
array_shift($words);
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$words = array_reverse($words);
|
||||||
|
$text = implode(" ", $words) . '';
|
||||||
|
}
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
|
||||||
|
$str = word_limiter($title);
|
||||||
|
$str = preg_replace('/[^0-9\.]/', '', $str);
|
||||||
|
print ' ('.$langs->trans("LastStableVersion").': <b>'.$str.'</b>';
|
||||||
|
if (DOL_VERSION == $str)
|
||||||
|
{
|
||||||
|
$youuselaststable=1;
|
||||||
|
print $langs->trans("YouUseLastStableVersion");
|
||||||
|
}
|
||||||
|
print ')';
|
||||||
|
print ' / <a href="http://www.gnu.org/copyleft/gpl.html">GNU-GPL v3+</a></li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
print '</ul>';
|
print '</ul>';
|
||||||
|
|
||||||
//print "<br>\n";
|
//print "<br>\n";
|
||||||
@ -114,6 +163,9 @@ print '</li>';
|
|||||||
print '</ul>';
|
print '</ul>';
|
||||||
|
|
||||||
|
|
||||||
|
print '</div><div class="fichehalfright">';
|
||||||
|
|
||||||
|
|
||||||
print $langs->trans("HelpCenter").':';
|
print $langs->trans("HelpCenter").':';
|
||||||
print '<ul>';
|
print '<ul>';
|
||||||
print '<li>';
|
print '<li>';
|
||||||
@ -122,6 +174,7 @@ print '<a target="_blank" href="'.DOL_URL_ROOT.'/support/index.php" data-ajax="f
|
|||||||
print '</li>';
|
print '</li>';
|
||||||
print '</ul>';
|
print '</ul>';
|
||||||
|
|
||||||
|
|
||||||
print $langs->trans("Foundation").':';
|
print $langs->trans("Foundation").':';
|
||||||
|
|
||||||
print '<ul>';
|
print '<ul>';
|
||||||
@ -153,6 +206,33 @@ print '</li>';
|
|||||||
|
|
||||||
print '</ul>';
|
print '</ul>';
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
print '</div>';
|
||||||
|
print '<div class="clearboth"></div>';
|
||||||
|
|
||||||
|
|
||||||
|
if ($youuselaststable)
|
||||||
|
{
|
||||||
|
print '<br>';
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
$tmp=versiondolibarrarray();
|
||||||
|
if ((empty($tmp[2]) && (strpos($tmp[1], '0') === 0)) || (strpos($tmp[2], '0') === 0))
|
||||||
|
{
|
||||||
|
print $langs->trans("TitleExampleForMajorRelease").':<br>';
|
||||||
|
print '<textarea style="width:80%; min-height: 60px">';
|
||||||
|
print $langs->trans("ExampleOfNewsMessageForMajorRelease", DOL_VERSION, DOL_VERSION);
|
||||||
|
print '</textarea>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $langs->trans("TitleExampleForMaintenanceRelease").':<br>';
|
||||||
|
print '<textarea style="width:80%; min-height: 60px">';
|
||||||
|
print $langs->trans("ExampleOfNewsMessageForMaintenanceRelease", DOL_VERSION, DOL_VERSION);
|
||||||
|
print '</textarea>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user