2
0
forked from Wavyzz/dolibarr

Compare commits

..

58 Commits
2.9.0 ... 2.8.1

Author SHA1 Message Date
Laurent Destailleur
a830971136 Fix: SQL Error 2010-05-31 10:27:50 +00:00
Regis Houssin
125bf602ce Fix: id is lost 2010-05-22 06:40:56 +00:00
Laurent Destailleur
a40792d2bb Update changelog 2010-05-18 08:22:07 +00:00
Laurent Destailleur
c8526a2a18 Fix: Change status of order to cancel 2010-05-17 12:48:59 +00:00
Laurent Destailleur
5ff9286a1f Fix: Change status of order to cancel 2010-05-17 12:45:10 +00:00
Laurent Destailleur
9f65a33f04 Fix: Missing include 2010-05-17 00:21:29 +00:00
Laurent Destailleur
59e43b289f Fix: Bad setup of phpMyAdmin for DoliWamp installer. 2010-05-16 22:39:17 +00:00
Regis Houssin
8fb412be2b Fix: country code of Monaco is MC
Fix: update license number of prototype and scriptaculous
2010-05-12 14:15:59 +00:00
Regis Houssin
29ffc5b6b6 Add possibility to defined "main_force_https" in install mode 2010-05-10 19:49:21 +00:00
Regis Houssin
7f15052000 Fix: if provider disable "glob()" function 2010-05-10 18:26:38 +00:00
Laurent Destailleur
234a39adea Fix: SQL error 2010-05-04 17:49:45 +00:00
Regis Houssin
1ec8213630 Fix: bug #29752 2010-05-03 16:03:43 +00:00
Laurent Destailleur
d081c30938 Fix: Duplicate lines 2010-04-22 20:44:30 +00:00
Laurent Destailleur
8f4f9c5de2 Fix: Clean orphelins 2010-04-18 20:55:34 +00:00
Laurent Destailleur
88fd8c701e Remove usage of $_ENV 2010-04-18 16:16:31 +00:00
Regis Houssin
9935122b67 Fix: global $conf manquant 2010-04-16 13:43:40 +00:00
Regis Houssin
bb28c51c1a Fix: bad path
Fix: view only image files
2010-04-15 13:44:02 +00:00
Laurent Destailleur
cbf4aa2f2a Fix: bug #29526 : Numrotation Proposition Incorrecte aprs duplication 2010-04-13 19:33:18 +00:00
Regis Houssin
293e56399e Fix: hide phones directory 2010-04-12 19:12:40 +00:00
Laurent Destailleur
c7b125120e Fix: Error when using iphone 2010-04-12 00:27:56 +00:00
Laurent Destailleur
fb254a1dd4 2.8.1 2010-04-10 11:30:11 +00:00
Regis Houssin
1afa3ceb69 Fix: bug #29454 2010-04-06 15:39:47 +00:00
Regis Houssin
c15c5a1f83 Fix: prevents errors with dollar sign 2010-04-04 09:38:46 +00:00
Regis Houssin
36505d86c4 Fix: bad path if product module is disabled 2010-04-02 07:57:56 +00:00
Regis Houssin
fce4e60c03 Fix: bad path if product module is disabled 2010-04-02 07:52:43 +00:00
Regis Houssin
1a8f41f5e4 Fix: mask problem 2010-03-31 06:57:59 +00:00
Laurent Destailleur
6feb1a06fa Fix: SQL error with strict option 2010-03-30 18:30:20 +00:00
Regis Houssin
fb6fe2e2d6 Fix: database name with underscore 2010-03-30 14:37:45 +00:00
Laurent Destailleur
cf067eebca Fix: Syntax error 2010-03-21 12:57:06 +00:00
Laurent Destailleur
0164bc4c69 Fix: Clean orphelins before creating foreign key 2010-03-21 11:59:22 +00:00
Laurent Destailleur
4d88519e6d Fix: List of category content 2010-03-20 20:26:17 +00:00
Laurent Destailleur
075117f8d6 Fix: Bad request 2010-03-17 18:55:43 +00:00
Laurent Destailleur
c944e9aa65 Prepare release 2.8 2010-03-15 23:13:27 +00:00
Laurent Destailleur
441dabe6fa Fix: Typo 2010-03-15 23:02:40 +00:00
Regis Houssin
e9d97ccc40 Fix: bad link 2010-03-01 16:52:37 +00:00
Laurent Destailleur
a6c6efd5b0 Fix: Missing condition on project 2010-02-28 00:42:35 +00:00
Laurent Destailleur
8d4ea5c0af Fix: Error on adding user as project contact 2010-02-27 23:47:05 +00:00
Laurent Destailleur
d09d1ab85c Sec: Fix security permission check 2010-02-27 20:15:41 +00:00
Laurent Destailleur
754dc90496 Fix: Parameter lost 2010-02-27 16:49:24 +00:00
Laurent Destailleur
d4ab0697f9 Fix: Can change password if has only permission change password. 2010-02-27 16:14:34 +00:00
Laurent Destailleur
3d380b46ac Fix: Bad utf8 encoding 2010-02-27 13:35:38 +00:00
Laurent Destailleur
3d1e357089 Fix maintenance script 2010-02-26 08:42:45 +00:00
Laurent Destailleur
df068798da Fix: Alias of dolibarr ico 2010-02-24 19:57:13 +00:00
Laurent Destailleur
f1107cdb4f Fix: Alias of dolibarr ico 2010-02-24 19:53:07 +00:00
Laurent Destailleur
b96a8bc796 Fix: Hide not required lines 2010-02-24 14:49:32 +00:00
Laurent Destailleur
4b5bcaa4c7 Fix: Limit of RCS too small 2010-02-24 14:48:55 +00:00
Laurent Destailleur
40abbaa622 Fix: Add warning if install.lock file removing fails 2010-02-24 13:01:26 +00:00
Laurent Destailleur
40a43da1e0 Message more clear 2010-02-24 12:27:21 +00:00
Laurent Destailleur
beb8ed8260 Sec: Exclude backup files from packages 2010-02-24 11:58:05 +00:00
Regis Houssin
c6a6ac8159 Fix: bad username and view datetext 2010-02-24 09:23:30 +00:00
Laurent Destailleur
7f20dd7d69 Fix: bug #28895 : Cration d'utilisateur impossible. 2010-02-22 19:15:49 +00:00
Laurent Destailleur
7afa85fbae Fix: debug multilang 2010-02-21 21:29:41 +00:00
Laurent Destailleur
c62a61c6ba Fix: A lot of fix in project permissions 2010-02-21 17:02:04 +00:00
Laurent Destailleur
a5dcf433f6 A lot of fix in project module 2010-02-21 00:17:03 +00:00
Laurent Destailleur
a3bb3f2cee Add more clear information for project view 2010-02-20 20:23:48 +00:00
Laurent Destailleur
fad16cf338 Fix: Error in deleting customer order 2010-02-20 18:43:19 +00:00
Regis Houssin
605d43a2ec Add migration script 2010-02-18 08:09:11 +00:00
Laurent Destailleur
218858dc72 Incresae timeout 2010-02-16 09:15:01 +00:00
1920 changed files with 83863 additions and 114877 deletions

View File

@@ -1,3 +1,3 @@
#Sun Mar 21 19:12:06 CET 2010
#Thu Aug 13 19:26:05 CEST 2009
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@@ -14,13 +14,12 @@ ArtiChow 1.07 Public Domain Yes Graphics
Php-barcode 0.3pl1 GPL 2.0 Yes Bar code generation
EFC/XFSS 1.0.1 LGPL 3.0 Yes Enhanced File Crypt/Extended File Stealth System
FCKEditor 2.6.4 LGPL 2.1 or Mozilla PL 1.0 Yes Editor WYSIWYG
FPDF 1.6 Public domain Yes PDF generation (original code is modified)
FPDF_TPL 1.1.4 Apache Software License 2.0 No GPL3 only PDF templates management
FPDI 1.3.2 Apache Software License 2.0 No GPL3 only PDF templates management
FPDI_Protection 1.0.3 Apache Software License 2.0 No GPL3 only PDF encryption (8 files)
FPDF 1.53 Public domain Yes PDF generation (original code is modified)
FPDF_TPL 1.1.2 Apache Software License 2.0 No GPL3 only PDF templates management
FPDI 1.2.1 Apache Software License 2.0 No GPL3 only PDF templates management
FPDI_Protection 1.0.2 Apache Software License 2.0 No GPL3 only PDF encryption (8 files)
GeoIP x.x Yes GeoIP Maxmind conversion
iWebkit 5.0.4 LGPL 3.0 Yes Iphone templates framework
JCrop 0.9.8 MIT Licence Yes JS library to crop images
iWebkit 4.6.2 LGPL 3.0 Yes Iphone templates framework
MagPieRss 0.72 GPL 2.0 Yes Load RSS
NuSoap 0.7.3 LGPL 2.1 Yes Interfaces with third tools
OdtPHP 1.0.1 GPL 2.0 Yes Mibrary to build/edit ODT files
@@ -45,7 +44,6 @@ Copyright (C) 2010
- Regis Houssin <regis@dolibarr.fr>
- simnandez
- r2gnl
- meos
Copyright (C) 2009
- Laurent Destailleur <eldy@users.sourceforge.net>

119
ChangeLog
View File

@@ -1,117 +1,12 @@
English Dolibarr ChangeLog
***** ChangeLog for 2.9.1 compared to 2.9 *****
***** ChangeLog for 2.8.2 compared to 2.8.1 *****
For users:
- Fix: Only few bug fixes in GUI.
- Fix: Fix: Error when deleting lock file by doliwamp.
***** ChangeLog for 2.9 compared to 2.8 *****
For users:
- New: POS module allow to choose which warehouse to use.
- New: Support "Department/State" field on company setup, contact,
bank account and members card.
- New: Can reopen a refused/canceled supplier order.
- New: Add Gant diagramm on project module.
- New: Add a new mode for automatic stock increase: Can be increased
on dispatching of products from a supplier order receipt.
- New: Can set a past delay to limit calendar export.
- New: Can attach files on emailing campaigns.
- New: Add statistics on trips and expenses module.
- New: Can reopen a closed customer order.
- New: Add module externalsite to add a web site/tools inside
menu and a Dolibarr frame.
- New: Can link trips and fees to a project.
- New: Add civility title in foundation module.
- New: Can set accountancy code for product (buy and sell).
- New: Can filter third parties lists on categories.
- New: Can filter products and services lists on categories.
- New: task #10202 : Support categories for members.
- New: Can build documents for third parties (Using ODT templates, need PHP 5.2+).
- New: Support new products properties: length and area.
- New: Add the "payment due before" field in invoice exports.
- New: Add feature to resize or crop image files (for products photos)
- New: task #10113 : Show list of emailing on clicking on "number of mass emailing received"
- New: Add default language for third parties and use it when multilang is enabled
to define default language for document generation.
- New: Can reopen a closed supplier invoice.
- New: Move permission "see hidden categories" into "see hidden products/services".
- New: Can delete several files at once in FTP module.
- New: Add box "last contracts".
- New: Works even if Web hosting provider has disabled PHP "glob" function.
- New: Can now send supplier orders by email.
- New: task #10076 : Show content of message in notification module.
- New: Bank name is shown on invoice.
- New: IBAN value is called IFSC if country is India.
- New: Add option to choose to show firstname then name or name then firstname on PDF.
- New: Add company in fields exported by export of members tool.
- New: Reorganise bank menus.
- New: Bookmarks can be sorted on a particular order.
- New: Support spanish RE and IRPF taxes on invoices.
- New: Module category offers categories for foundation module.
- New: Can filter on category on third parties, products and members listings.
- New: A flag is visible before country labels.
- New: When activating a new module, permissions for admin user are set. This save
time when configuring Dolibarr.
- New: Dolibarr 2.9 is faster than 2.8.
- New: A lot of more predefined VAT values, states, regions for
miscelaneous contries.
- New: Enhance skin engine to make themes easier.
- New: Add images into menu "eldy".
- New: Auguria theme is now more modern.
- New: Update tools refers to www.dolibarr.org but also www.dolistore.com web site.
- New: Postgresql experimental support seems to work completely.
- New: Changes in Dolibarr core to allow to use cache servers (see Memcached module on
dolistore.com).
- New: Default choice for interactive confirm box is yes by default, and no only for
delete actions. This reduce number of clicks required to validate actions and
is still safe to dangerous actions.
- Fix: Durations are correctly shown for languages using PM/AM dates.
- Fix: A lot of fixes in Point of Sale module.
- Fix: Debug experimental module widthrawal.
- Fix: Format number was wrong for ar_AR language.
- Fix: Can change password if user has only permission "change password".
- Fix: Project PDF document shows all tasks.
- Fix: bug #29278 : SMTP fails with IP instead of hostname.
- Fix: Default language on login page was wrong.
- Fix: Complete support of euros sign (even in PDF).
- Fix: Bad setup of phpMyAdmin for DoliWamp installer.
- Fix: Tracking number should be available on sending sheets.
- Fix: Stock value is not reset when product is transfered into other warehouse.
- Fix: A lot of not tracked bugs fixed.
- Fix: Some fixes in barcode management.
- Fix: Access to phpMyAdmin is now ok on new DoliWamp installation.
For tranlators:
- Fix: Major update of italian translation (it_IT).
- Fix: A lot of translation fixes in all languages.
- New: Added translations (sl_SL, is_IS).
- New: Add translations for the DoliWamp installer.
For developers:
- More comments in code.
- Uniformize some code.
- Delete all useless pre.inc.php files (this also increase speed).
- Fix W3C errors in page forging.
- Qual: Mutualize code of menu managers.
- Better isolation of modules files and dolibarr core files.
- Task #8682 : Remove functions unix_timestamp.
- The makepack tool now make pack with UID 500.
- More css class and div to output menu to allow more skins.
- Generated documentation can be build from Eclipse using Doxygen plugin.
- Snapshot is provided with PHPunit tests.
WARNING:
- A lot of class files (*.class.php) has moved into subdirectories. So If you use
or develop non official modules that includes Dolibarr classes, you will have to rename
path to thoose classes into the include function.
- Also, parameters of the "fetch()" method for class "User" has changed to reflect
other fetch methods.
- If you build a personalised themes, you must rename the style sheet into style.css.php.
- This version is also the last one to support PHP 4.*, Mysql 3.1, IE6.
Dolibarr 3.* will be supported with PHP 5+ and MySql 4.1+ only.
- Fix: if provider disable "glob()" function
- Fix: SQL error in interventions
- Fix: bug #29752
- Fix: Change status of order to cancel
***** ChangeLog for 2.8.1 compared to 2.8 *****
@@ -143,9 +38,9 @@ For users:
- New: Add a default errors-to email for emailing module.
- New: Can filter on user on stock movement list.
- New: When creating a third party from a member, it is set as a new
customer.
customer.
- New: Can use {tttt} in numbering mask setup. It will be replaced
with third party type.
with third party type.
- New: VAT number is stored in one field. This is more "international".
- New: task #9782 : Add possibility to delete a warehouse.
- New: task #9640 : Add label for stock movements.

View File

@@ -1,10 +1,10 @@
README (french)
--------------------------------
Documentation démarrage rapide
Documentation demarrage rapide
--------------------------------
1) Installer Dolibarr
2) Mettre à jour Dolibarr depuis une ancienne version
2) Mettre a jour Dolibarr depuis une ancienne version
3) Ce qui est nouveau dans cette version
4) Ce que peux faire Dolibarr
5) Ce que ne peux pas faire Dolibarr (pas encore)

View File

@@ -4,6 +4,7 @@ Section: web
Priority: optional
Maintainer: Laurent Destailleur <eldy@users.sourceforge.net>
Package: dolibarr
Section: web
Architecture: all
Essential: no
Depends: wwwconfig-common, apache2, libapache2-mod-php5, php5, php5-cgi, php5-curl, php5-gd, php5-imagick, php5-ldap, php5-mcrypt, php5-mysql, mysql-server, perl

View File

@@ -12,5 +12,5 @@ $force_install_databaserootlogin='__SUPERUSERLOGIN__';
$force_install_databaserootpass='__SUPERUSERPASSWORD__';
$force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1';
$force_install_lockinstall='444';
$force_install_lockinstall='1';
?>

View File

@@ -12,5 +12,5 @@ $force_install_databaserootlogin='root';
$force_install_databaserootpass='root';
$force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1';
$force_install_lockinstall='444';
$force_install_lockinstall='1';
?>

View File

@@ -48,8 +48,8 @@
<release>
<Version>
<name>stable</name>
<created>2009-12-01</created>
<revision>2.7</revision>
<created>2010-03-15</created>
<revision>2.8</revision>
</Version>
</release>

View File

@@ -1,42 +0,0 @@
[CustomMessages]
NameAndVersion=%1 version %2
AdditionalIcons=Ic<49>nes suppl<70>mentaires :
CreateDesktopIcon=Cr<43>er une ic<69>ne sur le &Bureau
CreateQuickLaunchIcon=Cr<43>er une ic<69>ne dans la barre de &Lancement rapide
ProgramOnTheWeb=Page d'accueil de %1
UninstallProgram=D<>sinstaller %1
LaunchProgram=Ex<45>cuter %1
AssocFileExtension=&Associer %1 avec l'extension de fichier %2
AssocingFileExtension=Associe %1 avec l'extension de fichier %2...
YouWillInstallDoliWamp=Vous allez installer ou mettre <20> jour DoliWamp (Apache+Mysql+PHP+Dolibarr) sur votre ordinateur.
ThisAssistantInstallOrUpgrade=Cet assistant installe ou met <20> jour Dolibarr ERP-CRM et tous ses composants pr<70>requis (Apache, Mysql et PHP) optimis<69> pour une utilisation de Dolibarr.
IfYouHaveTechnicalKnowledge=Si vous avez des comp<6D>tences techniques et envisagez de partager votre Apache, Mysql et PHP avec d'autres applications que Dolibarr, vous ne devriez pas utiliser cet assistant mais faire plutot une installation manuelle de Dolibarr sur un socle Apache, Mysql et PHP existant.
ButIfYouLook=Mais si vous recherchez une installation cl<63> en main automatis<69>e, vous <20>tes sur la bonne voie...
DoYouWantToStart=Voulez-vous d<>marrer le processus d'installation/mise <20> jour ?
TechnicalParameters=Param<61>tres techniques
IfFirstInstall=S'il s'agit de la premi<6D>re installation, merci de sp<73>cifier ces quelques param<61>tres techniques. Si vous ne les comprennez pas, <20>tes non surs, ou proc<6F>dez <20> une mise <20> jour, laissez les champs avec les valeurs propos<6F>es par d<>faut.
; WARNING !!! STRINGS HERE MUST BE LOWER THAN 60 CHARACTERS
SMTPServer=Serveur SMTP (le votre ou celui de votre FAI, premi<6D>re install uniquement) :
ApachePort=Port Apache (premi<6D>re install uniquement, le choix standard est 80) :
MySqlPort=Port Mysql (premi<6D>re install uniquement, le choix standard est 3306) :
MySqlPassword=Mot de passe du serveur et base MySql pour root (premi<6D>re install uniquement):
FailedToDeleteLock=Echec de la suppression du fichier %1/www/dolibarr/install.lock. Vous pouvez ignorer l'avertissement mais il est possible que vous deviez le supprimer manuellement plus tard. Dans ce cas, cela vous sera signal<61>. Cliquer sur OK pour continuer...
PortAlreadyInUse=Le port %1 semble d<>j<EFBFBD> utilis<69>. Il est recommand<6E> d'annuler pour revenir en arri<72>re et sp<73>cifier une autre valeur pour le port %2. Annuler le choix et choisir une autre valeur ?
FirefoxDetected=Firefox a <20>t<EFBFBD> d<>tect<63> sur votre ordinateur. Voulez-vous en faire votre navigateur par d<>faut pour Dolibarr ?
ChooseDefaultBrowser=Merci de choisir votre navigateur par d<>faut. Si vous n'<27>tes pas sur, cliquer simplement sur Ouvrir :
LaunchNow=Lancer Dolibarr maintenant
ProgramHasBeenRemoved=Les fichiers du programe Dolibarr ont <20>t<EFBFBD> supprim<69>s. Toutefois, tous vos fichiers de donn<6E>es sont toujours dans le r<>pertoire $1. Vous devez supprimer ce r<>pertoire manuellement pour avoir une d<>sinstallation compl<70>te.
DoliWampWillStartApacheMysql=L'installeur DoliWamp va maintenant d<>marrer ou red<65>marrer Apache et Mysql, ceci peut durer de quelques secondes <20> une minute apr<70>s cette confirmation. D<>marrer l'installation ou mise <20> jour du serveur web et base de donn<6E>es requis par Dolibarr ?

View File

@@ -55,7 +55,7 @@ $i = 0;
// full server array, just define values you need to change.
$i++;
$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port'] = '3307'; // MySQL port - leave blank for default port
$cfg['Servers'][$i]['port'] = 'WAMPMYSQLPORT'; // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket'] = ''; // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension'] = 'mysqli'; // The php MySQL extension to use ('mysql' or 'mysqli')

View File

@@ -18,14 +18,13 @@
; ----- Change this -----
AppName=DoliWamp
; DoliWamp-x.x.x or DoliWamp-x.x.x-dev or DoliWamp-x.x.x-beta
AppVerName=DoliWamp-2.9.0
AppVerName=DoliWamp-2.8.1
; DoliWamp-x.x x or DoliWamp-x.x.x-dev or DoliWamp-x.x.x-beta
OutputBaseFilename=DoliWamp-2.9.0
OutputBaseFilename=DoliWamp-2.8.1
; Define full path from wich all relative path are defined
; You must modify this to put here your dolibarr root directory
SourceDir=D:\Mes developpements\dolibarrold
; ----- End of change
;OutputManifestFile=build\doliwampbuild.log
AppId=doliwamp
AppPublisher=NLTechno
AppPublisherURL=http://www.nltechno.com
@@ -42,40 +41,17 @@ SolidCompression=yes
WizardImageFile=build\exe\doliwamp\doliwamp.bmp
WizardSmallImageFile=build\exe\doliwamp\doliwampsmall.bmp
SetupIconFile=doc\images\dolibarr.ico
PrivilegesRequired=admin
PrivilegesRequired=poweruser
DisableProgramGroupPage=yes
ChangesEnvironment=no
CreateUninstallRegKey=yes
;UseSetupLdr=no
;UninstallDisplayIcon={app}\bidon
OutputDir=build
ShowLanguageDialog=auto
ShowUndisplayableLanguages=no
;LanguageDetectionMethod=none
LanguageDetectionMethod=uilanguage
;SignedUninstaller=yes
[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl,build\exe\doliwamp\Languages\MyEnglish.isl"
Name: "br"; MessagesFile: "compiler:Languages\Portuguese.isl,build\exe\doliwamp\Languages\MyBrazilianPortuguese.isl"
Name: "ca"; MessagesFile: "compiler:Languages\Catalan.isl,build\exe\doliwamp\Languages\MyCatalan.isl"
Name: "da"; MessagesFile: "compiler:Languages\Danish.isl,build\exe\doliwamp\Languages\MyDanish.isl"
Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl,build\exe\doliwamp\Languages\MySpanish.isl"
Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl,build\exe\doliwamp\Languages\MyDutch.isl"
Name: "fi"; MessagesFile: "compiler:Languages\Finnish.isl,build\exe\doliwamp\Languages\MyFinnish.isl"
Name: "fr"; MessagesFile: "compiler:Languages\French.isl,build\exe\doliwamp\Languages\MyFrench.isl"
Name: "ge"; MessagesFile: "compiler:Languages\German.isl,build\exe\doliwamp\Languages\MyGerman.isl"
Name: "it"; MessagesFile: "compiler:Languages\Italian.isl,build\exe\doliwamp\Languages\MyItalian.isl"
Name: "nb"; MessagesFile: "compiler:Languages\Norwegian.isl,build\exe\doliwamp\Languages\MyNorwegian.isl"
Name: "po"; MessagesFile: "compiler:Languages\Polish.isl,build\exe\doliwamp\Languages\MyPolish.isl"
Name: "pt"; MessagesFile: "compiler:Languages\Portuguese.isl,build\exe\doliwamp\Languages\MyPortuguese.isl"
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl,build\exe\doliwamp\Languages\MyRussian.isl"
Name: "sv"; MessagesFile: "compiler:Languages\Slovenian.isl,build\exe\doliwamp\Languages\MySlovenian.isl"
[Tasks]
;Name: "autostart"; Description: "Automatically launch DoliWamp server on startup. If you check this option, Services will be installed as automatic. Otherwise, services will be installed as manual and will start and stop with the service manager."; GroupDescription: "Auto Start:" ;Flags: unchecked;
Name: "quicklaunchicon"; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
Name: "desktopicon"; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
Name: quicklaunchicon; Description: "Create a &Quick Launch icon"; GroupDescription: "Additional icons:"; Flags: unchecked
Name: "desktopicon"; Description: "Create a &Desktop icon"; GroupDescription: "Additional icons:"; Flags: unchecked
[Dirs]
Name: "{app}\logs"
@@ -103,7 +79,7 @@ Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversi
Source: "C:\Program Files (x86)\Wamp\apps\phpmyadmin3.2.0.1\*.*"; DestDir: "{app}\apps\phpmyadmin3.2.0.1"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log"
Source: "C:\Program Files (x86)\Wamp\bin\apache\apache2.2.6\*.*"; DestDir: "{app}\bin\apache\apache2.2.6"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
Source: "C:\Program Files (x86)\Wamp\bin\php\php5.2.5\*.*"; DestDir: "{app}\bin\php\php5.2.5"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
Source: "C:\Program Files (x86)\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
Source: "C:\Program Files (x86)\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log"
; Mysql data files (does not overwrite if exists)
Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mysql\mysql5.0.45\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db"
; Dolibarr
@@ -187,7 +163,7 @@ var value: String;
//procedures lancees au debut de l'installation
function InitializeSetup(): Boolean;
begin
Result := MsgBox(CustomMessage('YouWillInstallDoliWamp')+#13#13+CustomMessage('ThisAssistantInstallOrUpgrade')+#13#13+CustomMessage('IfYouHaveTechnicalKnowledge')+#13#13+CustomMessage('ButIfYouLook')+#13#13+CustomMessage('DoYouWantToStart'), mbConfirmation, MB_YESNO) = IDYES;
Result := MsgBox('You will install or upgrade DoliWamp (Apache+Mysql+PHP+Dolibarr) on your computer.' #13#13 'This assistant installs or upgrades Dolibarr ERP-CRM and required third party softwares (Apache, Mysql and PHP) configured for a Dolibarr usage.' #13#13 'If you have technical knowledge and plan to share your Apache, Mysql and PHP with other projects than Dolibarr, you should not use this assistant and make a manual installation of Dolibarr on an existing Apache, Mysql and PHP installation. If you don''t need a sophisticated manual setup, you''re on the good way...' #13#13 'Do you want to start installation/upgrade process ?', mbConfirmation, MB_YESNO) = IDYES;
end;
procedure InitializeWizard();
@@ -254,24 +230,24 @@ begin
// Prepare an object calle "Page" of type wpInstalling.
// Object will be show later in NextButtonClick function.
Page := CreateInputQueryPage(wpInstalling,
CustomMessage('TechnicalParameters'), '',
CustomMessage('IfFirstInstall'));
'Technical parameters', '',
'If first install, please specify some technical parameters. If you don''t understand, are not sure, or are doing an upgrade, just leave the default values.');
// TODO Add control differently if first install or update
if firstinstall
then
begin
Page.Add(CustomMessage('SMTPServer'), False);
Page.Add(CustomMessage('ApachePort'), False);
Page.Add(CustomMessage('MySqlPort'), False);
Page.Add(CustomMessage('MySqlPassword'), False);
Page.Add('SMTP server (your own or ISP SMTP server, first install only) :', False);
Page.Add('Apache port (first install only, common choice is 80) :', False);
Page.Add('Mysql port (first install only, common choice is 3306) :', False);
Page.Add('Mysql server and database password you want for root (first install only):', False);
end
else
begin
Page.Add(CustomMessage('SMTPServer'), False);
Page.Add(CustomMessage('ApachePort'), False);
Page.Add(CustomMessage('MySqlPort'), False);
Page.Add(CustomMessage('MySqlPassword'), False);
Page.Add('SMTP server (your own or ISP SMTP server, first install only) :', False);
Page.Add('Apache port (first install only, common choice is 80) :', False);
Page.Add('Mysql port (first install only, common choice is 3306) :', False);
Page.Add('Mysql server and database password you want for root (first install only):', False);
end;
// Default values
@@ -317,6 +293,7 @@ begin
if CurPageID = Page.ID then
begin
// This must be in if curpage.id = page.id, otherwise it is executed after each Next button
//----------------------------------------------
@@ -337,28 +314,23 @@ begin
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
phpDllCopy := 'msql.dll';
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
phpDllCopy := 'libmcrypt.dll';
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
phpDllCopy := 'libmysqli.dll';
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
phpDllCopy := 'ntwdblib.dll';
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
phpDllCopy := 'php5activescript.dll';
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
phpDllCopy := 'php5isapi.dll';
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
phpDllCopy := 'php5nsapi.dll';
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
phpDllCopy := 'php5ts.dll';
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
phpDllCopy := 'ssleay32.dll';
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
phpDllCopy := 'yaz.dll';
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
// With Wampserver 2.0i and PHP 5.3
phpDllCopy := 'libpq.dll';
phpDllCopy := 'libmcrypt.dll';
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
phpDllCopy := 'php5ts.dll';
filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
@@ -366,8 +338,8 @@ begin
lockfile := pathWithSlashes+'/www/dolibarr/install.lock';
if FileExists (lockfile) and not DeleteFile(lockfile) then
begin
themessage := FmtMessage(CustomMessage('FailedToDeleteLock'),[pathWithSlashes]);
MsgBox(themessage,mbInformation,MB_OK);
themessage := 'Failed to delete file '+pathWithSlashes+'/www/dolibarr/install.lock. You may have to remove it manually later when asked. Click OK to continue...';
MsgBox(themessage,mbInformation,MB_OK)
end
@@ -415,7 +387,7 @@ begin
// paramok := False;
// end;
// end;
if paramok then
begin
// Test port Apache
@@ -423,7 +395,7 @@ begin
//MsgBox('batFile = '+batFile,mbConfirmation,MB_YESNO)
Exec(batFile, '-s localhost -p '+myporta, path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
//themessage := 'Le port '+myporta+' semble deja pris. Revenez en arriere pour choisir une autre valeur pour le port Apache.';
themessage := FmtMessage(CustomMessage('PortAlreadyInUse'),[myporta,'Apache']);
themessage := 'Port '+myporta+' seems to be already in use. Go back to choose another value for Apache port. Cancel choice and choose another value ?';
if ((IntToStr(myResult) = '0') and (MsgBox(themessage,mbConfirmation,MB_YESNO) = IDYES)) then
begin
paramok := False;
@@ -437,7 +409,7 @@ begin
//MsgBox('batFile = '+batFile,mbConfirmation,MB_YESNO)
Exec(batFile, '-s localhost -p '+myport, path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
//themessage := 'Le port '+myport+' semble deja pris. Revenez en arriere pour choisir une autre valeur pour le port MySQL.';
themessage := FmtMessage(CustomMessage('PortAlreadyInUse'),[myport,'MySql']);
themessage := 'Port '+myport+' seems to be already in use. Go back to choose another value for MySQL port. Cancel choice and choose another value ?';
if ((IntToStr(myResult) = '0') and (MsgBox(themessage,mbConfirmation,MB_YESNO) = IDYES)) then
begin
paramok := False;
@@ -491,37 +463,37 @@ begin
browser := 'iexplore.exe';
if FileExists (pfPath+'/Mozilla Firefox/firefox.exe') then
begin
if MsgBox(CustomMessage('FirefoxDetected'),mbConfirmation,MB_YESNO) = IDYES then
if MsgBox('Firefox has been detected on your computer. Would you like to use it as the default browser with Dolibarr ?',mbConfirmation,MB_YESNO) = IDYES then
begin
browser := pfPath+'/Mozilla Firefox/firefox.exe';
end;
end;
if browser = 'iexplore.exe' then
begin
GetOpenFileName(CustomMessage('ChooseDefaultBrowser'), browser, winPath,'exe files (*.exe)|*.exe|All files (*.*)|*.*' ,'exe');
GetOpenFileName('Please choose your default browser. If you are not sure, just click Open :', browser, winPath,'exe files (*.exe)|*.exe|All files (*.*)|*.*' ,'exe');
end;
LoadStringFromFile (srcFile, srcContents);
StringChangeEx (srcContents, 'WAMPBROWSER', browser, True);
StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
StringChange (srcContents, 'WAMPBROWSER', browser);
StringChange (srcContents, 'WAMPAPACHEPORT', myporta);
StringChange (srcContents, 'WAMPAPACHEPSSL', myportas);
SaveStringToFile(destFile,srcContents, False);
LoadStringFromFile (srcFileH, srcContents);
StringChangeEx (srcContents, 'WAMPBROWSER', browser, True);
StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
StringChange (srcContents, 'WAMPBROWSER', browser);
StringChange (srcContents, 'WAMPAPACHEPORT', myporta);
StringChange (srcContents, 'WAMPAPACHEPSSL', myportas);
SaveStringToFile(destFileH,srcContents, False);
LoadStringFromFile (srcFileA, srcContents);
StringChangeEx (srcContents, 'WAMPBROWSER', browser, True);
StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
StringChange (srcContents, 'WAMPBROWSER', browser);
StringChange (srcContents, 'WAMPAPACHEPORT', myporta);
StringChange (srcContents, 'WAMPAPACHEPSSL', myportas);
SaveStringToFile(destFileA,srcContents, False);
end
if MsgBox(CustomMessage('DoliWampWillStartApacheMysql'),mbConfirmation,MB_YESNO) = IDYES then
if MsgBox('DoliWamp installer will now start or restart Apache and Mysql, this may last from several seconds to one minute after this confirmation. Start to install or upgrade the web server and database server ?',mbConfirmation,MB_YESNO) = IDYES then
begin
@@ -537,8 +509,8 @@ begin
LoadStringFromFile (srcFile, srcContents);
//installDir et version de phpmyadmin
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
StringChangeEx (srcContents, 'WAMPPHPMYADMINVERSION', phpmyadminVersion, True);
StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
StringChange (srcContents, 'WAMPPHPMYADMINVERSION', phpmyadminVersion);
SaveStringToFile(destFile,srcContents, False);
end
@@ -557,8 +529,8 @@ begin
begin
LoadStringFromFile (srcFile, srcContents);
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
StringChange (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass);
SaveStringToFile(destFile, srcContents, False);
end
@@ -578,8 +550,8 @@ begin
begin
// sinon on prends le fichier par defaut
LoadStringFromFile (srcFile, srcContents);
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
StringChange (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass);
StringChange (srcContents, 'WAMPMYSQLPORT', myport);
SaveStringToFile(destFile,srcContents, False);
end
@@ -597,10 +569,10 @@ begin
LoadStringFromFile (srcFile, srcContents);
//installDir et version de php
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
StringChange (srcContents, 'WAMPPHPVERSION', phpVersion);
StringChange (srcContents, 'WAMPAPACHEPORT', myporta);
StringChange (srcContents, 'WAMPAPACHEPSSL', myportas);
SaveStringToFile(destFile,srcContents, False);
end
@@ -620,8 +592,8 @@ begin
LoadStringFromFile (srcFile, srcContents);
//installDir et version de php
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
StringChange (srcContents, 'WAMPMYSQLPORT', myport);
SaveStringToFile(destFile,srcContents, False);
end
@@ -639,22 +611,22 @@ begin
if not FileExists (destFile) then
begin
LoadStringFromFile (srcFile, srcContents);
StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
StringChange (srcContents, 'WAMPPHPVERSION', phpVersion);
StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion);
StringChange (srcContents, 'WAMPAPACHEPORT', myporta);
StringChange (srcContents, 'WAMPAPACHEPSSL', myportas);
SaveStringToFile(destFile, srcContents, False);
end
else
begin
RenameFile(destFile, destFile+'.old');
LoadStringFromFile (srcFile, srcContents);
StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
StringChange (srcContents, 'WAMPPHPVERSION', phpVersion);
StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion);
StringChange (srcContents, 'WAMPAPACHEPORT', myporta);
StringChange (srcContents, 'WAMPAPACHEPSSL', myportas);
SaveStringToFile(destFile, srcContents, False);
end
@@ -673,10 +645,10 @@ begin
begin
LoadStringFromFile (srcFile, srcContents);
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
StringChange (srcContents, 'WAMPMYSQLPORT', myport);
StringChange (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass);
SaveStringToFile(destFile,srcContents, False);
end
@@ -695,8 +667,8 @@ begin
LoadStringFromFile (srcFile, srcContents);
//version de apache et mysql
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion);
SaveStringToFile(destFile,srcContents, False);
end
@@ -715,8 +687,8 @@ begin
LoadStringFromFile (srcFile, srcContents);
//version de apache et mysql
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion);
SaveStringToFile(destFile,srcContents, False);
end
@@ -736,8 +708,8 @@ begin
LoadStringFromFile (srcFile, srcContents);
//version de apache et mysql
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion);
SaveStringToFile(destFile,srcContents, False);
end
@@ -756,9 +728,9 @@ begin
LoadStringFromFile (srcFile, srcContents);
//version de apache et mysql
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
StringChange (srcContents, 'WAMPMYSQLPORT', myport);
StringChange (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass);
SaveStringToFile(destFile,srcContents, False);
end
@@ -776,10 +748,10 @@ begin
LoadStringFromFile (srcFile, srcContents);
//version de apache et mysql
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion);
StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
StringChange (srcContents, 'WAMPMYSQLPORT', myport);
SaveStringToFile(destFile,srcContents, False);
end
@@ -797,10 +769,10 @@ begin
LoadStringFromFile (srcFile, srcContents);
//version de apache et mysql
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion);
StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
StringChange (srcContents, 'WAMPMYSQLPORT', myport);
SaveStringToFile(destFile,srcContents, False);
end
@@ -818,8 +790,8 @@ begin
LoadStringFromFile (srcFile, srcContents);
//version de apache et mysql
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion);
SaveStringToFile(destFile,srcContents, False);
end
@@ -835,8 +807,8 @@ begin
if not FileExists (destFile) and FileExists(srcFile) then
begin
LoadStringFromFile (srcFile, srcContents);
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
StringChangeEx (srcContents, 'WAMPSMTP', mysmtp, True);
StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
StringChange (srcContents, 'WAMPSMTP', mysmtp);
SaveStringToFile(destFile,srcContents, False);
end
@@ -850,8 +822,8 @@ begin
if not FileExists (destFile) and FileExists(srcFile) then
begin
LoadStringFromFile (srcFile, srcContents);
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
StringChangeEx (srcContents, 'WAMPSMTP', mysmtp, True);
StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
StringChange (srcContents, 'WAMPSMTP', mysmtp);
SaveStringToFile(destFile,srcContents, False);
end
@@ -948,13 +920,13 @@ begin
pathWithSlashes := path;
StringChange (pathWithSlashes, '\','/');
MsgBox(FmtMessage(CustomMessage('ProgramHasBeenRemoved'),[path]),mbInformation,MB_OK);
MsgBox('Dolibarr program files have been removed. However, all your old data files are still in directory '+path+'. You must remove this directory manually for a complete uninstall.',mbInformation,MB_OK);
end;
[Run]
; Launch Dolibarr in browser. This is run after Wizard because of postinstall flag
Filename: "{app}\rundoliwamp.bat"; Description: {cm:LaunchNow}; Flags: shellexec postinstall skipifsilent runhidden
Filename: "{app}\rundoliwamp.bat"; Description: "Launch Dolibarr now"; Flags: shellexec postinstall skipifsilent runhidden
[UninstallDelete]

View File

@@ -12,5 +12,5 @@ $force_install_databaserootlogin='root';
$force_install_databaserootpass='WAMPMYSQLNEWPASSWORD';
$force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1';
$force_install_lockinstall='644';
$force_install_lockinstall='1';
?>

View File

@@ -686,11 +686,11 @@ extension=php_pdo_mysql.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
extension=php_pgsql.dll
;extension=php_pgsql.dll
;extension=php_pspell.dll
extension=php_shmop.dll
;extension=php_snmp.dll
extension=php_soap.dll
;extension=php_soap.dll
extension=php_sockets.dll
extension=php_sqlite.dll
;extension=php_sybase_ct.dll

View File

@@ -10,8 +10,8 @@ use Cwd;
$PROJECT="dolibarr";
$MAJOR="2";
$MINOR="9";
$BUILD="0-dev"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate
$MINOR="8";
$BUILD="1"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate
$RPMSUBVERSION="1"; # A incrementer au moment de la release
@LISTETARGET=("TGZ","ZIP","RPM","DEB","EXE","EXEDOLIWAMP","SNAPSHOT"); # Possible packages

View File

@@ -1,40 +1,9 @@
----- Dolibarr Makepack How To -----
This documentation describe steps to build a BETA or RELREASE versions
of Dolibarr. There is a chapter for BETA version and a chapter vor
RELEASE version.
***** Actions to do a BETA *****
This files describe steps made by Dolibarr packaging team to make a
beta version of Dolibarr, step by step.
- Check all files are commited.
- Update version/info in / directory (README*.txt, ChangeLog...)
- Update version number in build/makepack-dolibarr.pl
- Update version number in build/exe/doliwamp/doliwamp.iss
- Update version number in htdocs/master.inc.php
- Update version number in htdocs/install/inc.php
- Commit all changes.
- Add a CVS Tag (DOLIBARR_x_y_BETA)
- If it's a new branch (Vx.y), create a branch (DOLIBARR_x_y_BRANCH).
- Build Dolibarr and DoliWamp with makepack-dolibarr.pl
- Check content of built packages.
- Move build files (tgz+exe+deb), ChangeLog and PAD/DOAP files into the
Dolibarr web site repository /home/dolibarr/wwwroot/files.
- Update and upload NLTechno web page with DoliWamp version.
- Add/Update entries on joomla web site www.dolibarr.org with links
to files http://www.dolibarr.org/files/XXX.
- Send mail on mailings-list
***** Actions to do a RELEASE *****
***** Actions to do to release *****
This files describe steps made by Dolibarr packaging team to make a
complete release of Dolibarr, step by step.
- Check all files are commited.
- Update version/info in / directory (README*.txt, ChangeLog...)
- Update files in root directory (README*.txt, ChangeLog...)
- Update version number in build/makepack-dolibarr.pl
- Update version number in build/doxygen/dolibarr-doxygen.doxyfile
- Update version number in build/exe/doliwamp/doliwamp.iss
@@ -43,18 +12,19 @@ complete release of Dolibarr, step by step.
- Update version number in htdocs/install/inc.php
- Update PAD and DOAP files.
- Commit all changes.
- Add a CVS Tag (DOLIBARR_x_y)
- Add a CVS Tag
- If it's a new branch (Vx.y), create a branch.
- Build Dolibarr and DoliWamp with makepack-dolibarr.pl
- Check content of built packages.
- Move build files (tgz+exe+deb), ChangeLog and PAD/DOAP files into the
Dolibarr web site repository /home/dolibarr/wwwroot/files.
- Edit symbolic links in directory "/home/dolibarr/wwwroot/files" on server to
point to new files.
- Update and upload NLTechno web page with DoliWamp version.
- Move build files (tgz+exe), ChangeLog and PAD/DOAP files into Dolibarr
web site repository /home/dolibarr/wwwroot/files.
- Move links in directory "/home/dolibarr/wwwroot/files" on server to point
to new files.
- Upload NLTechno web page with DoliWamp version.
- Upload files dolibarr.*.tgz and doliwamp.*.exe on sourceforge.
- Add/Update entries on joomla web site www.dolibarr.org with new sourceforge link.
- Update entries on joomla web site www.dolibarr.org with new sourceforge link.
- Send mail on mailings-list
- Send news on OpenSource web sites (if major beta or release)

View File

@@ -5,7 +5,7 @@
<Program_Info>
<Program_Name>DoliWamp</Program_Name>
<Program_Version>2.8.0</Program_Version>
<Program_Release_Month>02</Program_Release_Month>
<Program_Release_Month>03</Program_Release_Month>
<Program_Release_Day>13</Program_Release_Day>
<Program_Release_Year>2010</Program_Release_Year>
<Program_Cost_Dollars />
@@ -15,7 +15,7 @@
<Program_Release_Status>Major Update</Program_Release_Status>
<Program_Install_Support>Install and Uninstall</Program_Install_Support>
<Program_OS_Support>Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
<Program_Language>English,Catalan,Dutch,French,German,Italian,Norwegian,Portuguese,Spanish</Program_Language>
<Program_Language>English,Catalan,Danish,Dutch,French,German,Italian,Norwegian,Portuguese,Romanian,Russian,Spanish</Program_Language>
<Program_Change_Info>http://www.dolibarr.org</Program_Change_Info>
<Program_Specific_Category>Business</Program_Specific_Category>
<Program_Category_Class>Business::Accounting &amp; Finance</Program_Category_Class>

View File

@@ -5,7 +5,7 @@
<Program_Info>
<Program_Name>Dolibarr</Program_Name>
<Program_Version>2.8.0</Program_Version>
<Program_Release_Month>02</Program_Release_Month>
<Program_Release_Month>03</Program_Release_Month>
<Program_Release_Day>13</Program_Release_Day>
<Program_Release_Year>2010</Program_Release_Year>
<Program_Cost_Dollars />
@@ -15,7 +15,7 @@
<Program_Release_Status>Major Update</Program_Release_Status>
<Program_Install_Support>No Install Support</Program_Install_Support>
<Program_OS_Support>Linux,Mac OS X,Mac Other,Unix,Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
<Program_Language>English,Catalan,Dutch,French,German,Italian,Norwegian,Portuguese,Spanish</Program_Language>
<Program_Language>English,Catalan,Danish,Dutch,French,German,Italian,Norwegian,Portuguese,Romanian,Russian,Spanish</Program_Language>
<Program_Change_Info>http://www.dolibarr.org</Program_Change_Info>
<Program_Specific_Category>Business</Program_Specific_Category>
<Program_Category_Class>Business::Accounting &amp; Finance</Program_Category_Class>

Binary file not shown.

View File

@@ -6,26 +6,26 @@
<MASTER_PAD_INFO>Portable Application Description, or PAD for short, is a data set that is used by shareware authors to disseminate information to anyone interested in their software products. To find out more go to http://www.asp-shareware.org/pad</MASTER_PAD_INFO>
</MASTER_PAD_VERSION_INFO>
<Company_Info>
<Company_Name>NLTechno</Company_Name>
<Company_Name>Dolibarr team</Company_Name>
<Address_1>61 Boulevard Vauban</Address_1>
<Address_2 />
<City_Town>Montigny-le-Bretonneux</City_Town>
<State_Province />
<Zip_Postal_Code>78180</Zip_Postal_Code>
<Country>FRANCE</Country>
<Company_WebSite_URL>http://www.nltechno.com</Company_WebSite_URL>
<Company_WebSite_URL>http://www.dolibarr.org</Company_WebSite_URL>
<Contact_Info>
<Author_First_Name>NLTechno</Author_First_Name>
<Author_Last_Name>NLTechno</Author_Last_Name>
<Author_Email>dolibarr@nltechno.com</Author_Email>
<Contact_First_Name>NLTechno</Contact_First_Name>
<Contact_Last_Name>NLTechno</Contact_Last_Name>
<Contact_Email>dolibarr@nltechno.com</Contact_Email>
<Author_First_Name>Dolibarr team</Author_First_Name>
<Author_Last_Name>Dolibarr team</Author_Last_Name>
<Author_Email>dolibarr-dev@nongnu.org</Author_Email>
<Contact_First_Name>Dolibarr team</Contact_First_Name>
<Contact_Last_Name>Dolibarr team</Contact_Last_Name>
<Contact_Email>dolibarr-dev@nongnu.org</Contact_Email>
</Contact_Info>
<Support_Info>
<Sales_Email>dolibarr@nltechno.com</Sales_Email>
<Support_Email>dolibarr@nltechno.com</Support_Email>
<General_Email>dolibarr@nltechno.com</General_Email>
<Sales_Email>dolibarr-dev@nongnu.org</Sales_Email>
<Support_Email>dolibarr-dev@nongnu.org</Support_Email>
<General_Email>dolibarr-dev@nongnu.org</General_Email>
<Sales_Phone />
<Support_Phone />
<General_Phone />
@@ -34,8 +34,8 @@
</Company_Info>
<Program_Info>
<Program_Name>Dolibarr</Program_Name>
<Program_Version>2.9.0</Program_Version>
<Program_Release_Month>04</Program_Release_Month>
<Program_Version>2.8.0</Program_Version>
<Program_Release_Month>03</Program_Release_Month>
<Program_Release_Day>13</Program_Release_Day>
<Program_Release_Year>2010</Program_Release_Year>
<Program_Cost_Dollars />
@@ -46,7 +46,7 @@
<Program_Install_Support>No Install Support</Program_Install_Support>
<Program_OS_Support>Linux,Mac OS X,Mac Other,Unix,Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
<Program_Language>English,Catalan,Danish,Dutch,French,German,Italian,Norwegian,Portuguese,Romanian,Russian,Spanish</Program_Language>
<Program_Change_Info>http://www.dolibarr.org/files/ChangeLog</Program_Change_Info>
<Program_Change_Info>http://www.dolibarr.org</Program_Change_Info>
<Program_Specific_Category>Business</Program_Specific_Category>
<Program_Category_Class>Business::Accounting &amp; Finance</Program_Category_Class>
<Program_System_Requirements>None</Program_System_Requirements>

Binary file not shown.

View File

@@ -34,8 +34,8 @@
</Company_Info>
<Program_Info>
<Program_Name>DoliWamp</Program_Name>
<Program_Version>2.9.0</Program_Version>
<Program_Release_Month>04</Program_Release_Month>
<Program_Version>2.8.0</Program_Version>
<Program_Release_Month>03</Program_Release_Month>
<Program_Release_Day>13</Program_Release_Day>
<Program_Release_Year>2010</Program_Release_Year>
<Program_Cost_Dollars />
@@ -46,7 +46,7 @@
<Program_Install_Support>Install and Uninstall</Program_Install_Support>
<Program_OS_Support>Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
<Program_Language>English,Catalan,Danish,Dutch,French,German,Italian,Norwegian,Portuguese,Romanian,Russian,Spanish</Program_Language>
<Program_Change_Info>http://www.dolibarr.org/files/ChangeLog</Program_Change_Info>
<Program_Change_Info>http://www.dolibarr.org</Program_Change_Info>
<Program_Specific_Category>Business</Program_Specific_Category>
<Program_Category_Class>Business::Accounting &amp; Finance</Program_Category_Class>
<Program_System_Requirements>None</Program_System_Requirements>

View File

@@ -23,25 +23,20 @@ sub script_dolibarr_longdesc
return "Dolibarr ERP/CRM is a powerful Open Source software to manage a professional or foundation activity (small and medium enterprises, freelancers).";
}
sub script_dolibarr_author
{
return "Regis Houssin";
}
# script_dolibarr_versions()
sub script_dolibarr_versions
{
return ( "2.8.0", "2.7.1" );
return ( "2.7.0", "2.7.1", "2.8.0" );
}
sub script_dolibarr_category
{
return "Commerce";
return "ERP/CRM";
}
sub script_dolibarr_php_vers
{
return ( 5 );
return ( 4, 5 );
}
sub script_dolibarr_php_vars
@@ -184,10 +179,10 @@ local $olddocdir = &transname();
local $url;
$path = &script_path_url($d, $opts);
if ($path =~ /^https:/) {
$url = "https://$d->{'dom'}";
$url = "https://www.$d->{'dom'}";
}
else {
$url = "http://$d->{'dom'}";
$url = "http://www.$d->{'dom'}";
}
if ($opts->{'path'} =~ /\w/) {
$url .= $opts->{'path'};
@@ -211,37 +206,26 @@ if ($upgrade) {
# Put back original config file and documents directory
&copy_source_dest_as_domain_user($d, $oldcfile, $cfile);
&copy_source_dest_as_domain_user($d, $olddocdir, $docdir);
# First page (Update database schema)
local @params = ( [ "action", "upgrade" ],
[ "versionfrom", $upgrade->{'version'} ],
[ "versionto", $ver ],
[ "versionfrom", $ver ],
[ "versionto", $upgrade->{'version'} ],
);
local $err = &call_dolibarr_wizard_page(\@params, "upgrade", $d, $opts);
return (-1, "Dolibarr wizard failed : $err") if ($err);
# Second page (Migrate some data)
local @params = ( [ "action", "upgrade" ],
[ "versionfrom", $upgrade->{'version'} ],
[ "versionto", $ver ],
);
local @params = ( [ "action", "upgrade" ] );
local $err = &call_dolibarr_wizard_page(\@params, "upgrade2", $d, $opts);
return (-1, "Dolibarr wizard failed : $err") if ($err);
# Third page (Update version number)
local @params = ( [ "action", "upgrade" ],
[ "versionfrom", $upgrade->{'version'} ],
[ "versionto", $ver ],
);
local $err = &call_dolibarr_wizard_page(\@params, "etape5", $d, $opts);
return (-1, "Dolibarr wizard failed : $err") if ($err);
# Remove the installation directory.
local $dinstall = "$opts->{'dir'}/install";
$dinstall =~ s/\/$//;
$out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall )."/* ");
$out = &run_as_domain_user($d, "rmdir ".quotemeta($dinstall ));
}
else {
# First page (Db connection and config file creation)
@@ -257,12 +241,12 @@ else {
);
local $err = &call_dolibarr_wizard_page(\@params, "etape1", $d, $opts);
return (-1, "Dolibarr wizard failed : $err") if ($err);
# Second page (Populate database)
local @params = ( [ "action", "set" ] );
local $err = &call_dolibarr_wizard_page(\@params, "etape2", $d, $opts);
return (-1, "Dolibarr wizard failed : $err") if ($err);
# Third page (Add administrator account)
local @params = ( [ "action", "set" ],
[ "login", "admin" ],
@@ -271,7 +255,7 @@ else {
);
local $err = &call_dolibarr_wizard_page(\@params, "etape5", $d, $opts);
return (-1, "Dolibarr wizard failed : $err") if ($err);
# Remove the installation directory and protect config file.
local $dinstall = "$opts->{'dir'}/install";
$dinstall =~ s/\/$//;
@@ -279,7 +263,7 @@ else {
$out = &run_as_domain_user($d, "rmdir ".quotemeta($dinstall ));
&set_ownership_permissions(undef, undef, 0644, $cfile);
&set_ownership_permissions(undef, undef, 0755, $cfiledir);
}
# Return a URL for the user
@@ -336,11 +320,8 @@ return (1, "Dolibarr directory and tables deleted.");
sub script_dolibarr_latest
{
local ($ver) = @_;
if ($ver >= 2.8) {
return ( "http://www.dolibarr.fr/files/stable/",
"dolibarr\\-(2\\.[0-9\\.]+)" );
}
return ( );
return ( "http://www.dolibarr.fr/files/stable/",
"dolibarr\-(2\.[0-9\.][0-9])" );
}
sub script_dolibarr_site

Binary file not shown.

View File

@@ -35,10 +35,10 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
// Recupere root dolibarr
$path=preg_replace('/generate-commande.php/i','',$_SERVER["PHP_SELF"]);
require ($path."../htdocs/master.inc.php");
include_once(DOL_DOCUMENT_ROOT."/societe/societe.class.php");
include_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
include_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
include_once(DOL_DOCUMENT_ROOT."/product/product.class.php");
include_once(DOL_DOCUMENT_ROOT."/societe.class.php");
include_once(DOL_DOCUMENT_ROOT."/contact.class.php");
include_once(DOL_DOCUMENT_ROOT."/facture.class.php");
include_once(DOL_DOCUMENT_ROOT."/product.class.php");
include_once(DOL_DOCUMENT_ROOT."/paiement.class.php");
include_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php");
@@ -160,7 +160,7 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
$com->date_commande = $dates[rand(1, sizeof($dates)-1)];
$com->note = $_POST["note"];
$com->source = 1;
$com->fk_project = 0;
$com->projetid = 0;
$com->remise_percent = 0;
$nbp = rand(2, 5);

View File

@@ -34,8 +34,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
// Recupere root dolibarr
$path=preg_replace('/generate-facture.php/i','',$_SERVER["PHP_SELF"]);
require ($path."../htdocs/master.inc.php");
require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
require_once(DOL_DOCUMENT_ROOT."/societe/societe.class.php");
require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
require_once(DOL_DOCUMENT_ROOT."/societe.class.php");
/*

View File

@@ -35,10 +35,10 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
// Recupere root dolibarr
$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
require ($path."../htdocs/master.inc.php");
include_once(DOL_DOCUMENT_ROOT."/societe/societe.class.php");
include_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
include_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
include_once(DOL_DOCUMENT_ROOT."/product/product.class.php");
include_once(DOL_DOCUMENT_ROOT."/societe.class.php");
include_once(DOL_DOCUMENT_ROOT."/contact.class.php");
include_once(DOL_DOCUMENT_ROOT."/facture.class.php");
include_once(DOL_DOCUMENT_ROOT."/product.class.php");
include_once(DOL_DOCUMENT_ROOT."/paiement.class.php");
include_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php");

View File

@@ -35,10 +35,10 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
// Recupere root dolibarr
$path=preg_replace('/generate-propale.php/i','',$_SERVER["PHP_SELF"]);
require ($path."../htdocs/master.inc.php");
require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
require_once(DOL_DOCUMENT_ROOT."/comm/propal/propal.class.php");
require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
require_once(DOL_DOCUMENT_ROOT."/propal.class.php");
require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php");
require_once(DOL_DOCUMENT_ROOT."/societe/societe.class.php");
require_once(DOL_DOCUMENT_ROOT."/societe.class.php");
/*
* Parameters

View File

@@ -35,10 +35,10 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
// Recupere root dolibarr
$path=preg_replace('/generate-societe.php/i','',$_SERVER["PHP_SELF"]);
require ($path."../htdocs/master.inc.php");
include_once(DOL_DOCUMENT_ROOT."/societe/societe.class.php");
include_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
include_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
include_once(DOL_DOCUMENT_ROOT."/product/product.class.php");
include_once(DOL_DOCUMENT_ROOT."/societe.class.php");
include_once(DOL_DOCUMENT_ROOT."/contact.class.php");
include_once(DOL_DOCUMENT_ROOT."/facture.class.php");
include_once(DOL_DOCUMENT_ROOT."/product.class.php");
include_once(DOL_DOCUMENT_ROOT."/paiement.class.php");
include_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php");

File diff suppressed because one or more lines are too long

View File

@@ -26,7 +26,8 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path=dirname(__FILE__).'/';
$path=str_replace($script_file,'',$_SERVER["PHP_SELF"]);
$path=preg_replace('@[\\\/]+$@','',$path).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {

View File

@@ -26,7 +26,8 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path=dirname(__FILE__).'/';
$path=str_replace($script_file,'',$_SERVER["PHP_SELF"]);
$path=preg_replace('@[\\\/]+$@','',$path).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
@@ -67,7 +68,7 @@ print 'Argument 2='.$argv[2]."\n";
// Start of transaction
$db->begin();
require_once(DOL_DOCUMENT_ROOT."/product/product.class.php");
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
// Create instance of object
$myproduct=new Product($db);

View File

@@ -25,11 +25,12 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path=dirname(__FILE__).'/';
$path=str_replace($script_file,'',$_SERVER["PHP_SELF"]);
$path=preg_replace('@[\\\/]+$@','',$path).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
echo "Error: You ar usingr PH for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
exit;
}
@@ -122,8 +123,8 @@ else
// Define working variables
$table=strtolower($table);
$tablenollx=preg_replace('/llx_/i','',$table);
$classname=ucfirst($tablenollx);
$classmin=strtolower($classname);
$class=ucfirst($tablenollx);
$classmin=strtolower($class);
// Read skeleton_class.class.php file
@@ -145,7 +146,7 @@ $targetcontent=$sourcecontent;
$targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent);
$targetcontent=preg_replace('/\$element=\'skeleton\'/', '\$element=\''.$classmin.'\'', $targetcontent);
$targetcontent=preg_replace('/\$table_element=\'skeleton\'/', '\$table_element=\''.$classmin.'\'', $targetcontent);
$targetcontent=preg_replace('/Skeleton_class/', $classname, $targetcontent);
$targetcontent=preg_replace('/Skeleton_class/', $class, $targetcontent);
// Substitute comments
$targetcontent=preg_replace('/This file is an example to create a new class file/', 'Put here description of this class', $targetcontent);
@@ -376,7 +377,7 @@ $targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.ph
$targetcontent=preg_replace('/skeleton_script\.php/', $classmin.'_script.php', $targetcontent);
$targetcontent=preg_replace('/\$element=\'skeleton\'/', '\$element=\''.$classmin.'\'', $targetcontent);
$targetcontent=preg_replace('/\$table_element=\'skeleton\'/', '\$table_element=\''.$classmin.'\'', $targetcontent);
$targetcontent=preg_replace('/Skeleton_class/', $classname, $targetcontent);
$targetcontent=preg_replace('/Skeleton_class/', $class, $targetcontent);
// Substitute comments
$targetcontent=preg_replace('/This file is an example to create a new class file/', 'Put here description of this class', $targetcontent);

View File

@@ -25,7 +25,8 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path=dirname(__FILE__).'/';
$path=str_replace($script_file,'',$_SERVER["PHP_SELF"]);
$path=preg_replace('@[\\\/]+$@','',$path).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {

View File

@@ -1,7 +1,6 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,8 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
* \defgroup mymodule Module MyModule
/** \defgroup mymodule Module MyModule
* \brief Example of a module descriptor.
* Such a file must be copied into htdocs/includes/module directory.
*/
@@ -33,8 +31,7 @@
include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php");
/**
* \class modMyModule
/** \class modMyModule
* \brief Description and activation class for module MyModule
*/
class modMyModule extends DolibarrModules
@@ -68,18 +65,15 @@ class modMyModule extends DolibarrModules
$this->special = 0;
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'
// If file is in module/images directory, use this->picto=DOL_URL_ROOT.'/module/images/file.png'
$this->picto='generic';
// Defined if the directory /mymodule/inc/triggers/ contains triggers or not
$this->triggers = 0;
// Data directories to create when module is enabled.
// Example: this->dirs = array("/mymodule/temp");
$this->dirs = array();
$r=0;
// Relative path to module style sheet if exists. Example: '/mymodule/css/mycss.css'.
// Relative path to module style sheet if exists. Example: '/mymodule/mycss.css'.
$this->style_sheet = '';
// Config pages. Put here list of php page names stored in admmin directory used to setup module.
@@ -93,9 +87,9 @@ class modMyModule extends DolibarrModules
$this->langfiles = array("mymodule");
// Constants
// Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',0),
// 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0) );
$this->const = array(); // List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 0 or 'allentities')
$this->const = array(); // List of particular constants to add when module is enabled
//Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',0),
// 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0) );
// Array to add new pages in new tabs
$this->tabs = array('entity:Title:@mymodule:/mymodule/mynewtab.php?id=__ID__');
@@ -148,7 +142,7 @@ class modMyModule extends DolibarrModules
// 'type'=>'top', // This is a Top menu entry
// 'titre'=>'MyModule top menu',
// 'mainmenu'=>'mymodule',
// 'leftmenu'=>'1', // Use 1 if you also want to add left menu entries using this descriptor.
// 'leftmenu'=>'1', // Use 1 if you also want to add left menu entries using this descriptor. Use 0 if left menu entries are defined in a file pre.inc.php (old school).
// 'url'=>'/mymodule/pagetop.php',
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
// 'position'=>100,

58
dev/skeletons/pre.inc.php Normal file
View File

@@ -0,0 +1,58 @@
<?php
/* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
* \file htdocs/dev/skeletons/pre.inc.php
* \brief File to manage left menu by default
* \version $Id$
*/
// Include environment and check authentification
require ("../../main.inc.php"); // This include must use a relative link to the main.inc.php file
/**
* \brief Function called by page to show menus (top and left)
* \param head Text to show as head line
* \param title Not used
* \param helppagename Name of a help page ('' by default).
* Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage
* For other external page: http://server/url
*/
function llxHeader($head = '', $title='', $help_url='')
{
global $user, $conf, $langs;
top_menu($head, $title);
$menu = new Menu();
// Create default menu.
// No code here is required if you already added menu entries in
// the module descriptor (recommanded).
// If not you must manually add menu entries here (not recommanded).
/*
$langs->load("mylangfile");
$menu->add(DOL_URL_ROOT."/mylink.php", $langs->trans("MyMenuLabel"));
}
*/
left_menu($menu->liste, $help_url);
}
?>

View File

@@ -27,9 +27,9 @@
*/
// Put here all includes required by your class file
//require_once(DOL_DOCUMENT_ROOT."/core/commonobject.class.php");
//require_once(DOL_DOCUMENT_ROOT."/societe/societe.class.php");
//require_once(DOL_DOCUMENT_ROOT."/product/product.class.php");
//require_once(DOL_DOCUMENT_ROOT."/commonobject.class.php");
//require_once(DOL_DOCUMENT_ROOT."/societe.class.php");
//require_once(DOL_DOCUMENT_ROOT."/product.class.php");
/**
@@ -108,7 +108,7 @@ class Skeleton_class // extends CommonObject
// want this action call a trigger.
//// Call triggers
//include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php");
//include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
//$interface=new Interfaces($this->db);
//$result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
@@ -217,7 +217,7 @@ class Skeleton_class // extends CommonObject
// want this action call a trigger.
//// Call triggers
//include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php");
//include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
//$interface=new Interfaces($this->db);
//$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
@@ -272,7 +272,7 @@ class Skeleton_class // extends CommonObject
// want this action call a trigger.
//// Call triggers
//include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php");
//include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
//$interface=new Interfaces($this->db);
//$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; }

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) ---Put here your own copyright and developer email---
*
* This program is free software; you can redistribute it and/or modify
@@ -25,22 +25,8 @@
* \author Put author name here
* \remarks Put here some comments
*/
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1');
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1');
//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1');
//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1');
//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
//if (! defined("NOLOGIN")) define("NOLOGIN",'1');
// Change this following line to use the correct relative path (../, ../../, etc)
require("../main.inc.php");
// Change this following line to use the correct relative path from htdocs (do not remove DOL_DOCUMENT_ROOT)
require_once(DOL_DOCUMENT_ROOT."/skeleton/skeleton_class.class.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/../dev/skeletons/skeleton_class.class.php");
// Load traductions files requiredby by page
$langs->load("companies");
@@ -98,21 +84,6 @@ $form=new Form($db);
// ...
/***************************************************
* LINKED OBJECT BLOCK
*
* Put here code to view linked object
****************************************************/
$myobject->load_object_linked($myobject->id,$myobject->element);
foreach($myobject->linked_object as $object => $objectid)
{
if($conf->$object->enabled)
{
$somethingshown=$myobject->showLinkedObjectBlock($object,$objectid,$somethingshown);
}
}
// End of page
$db->close();
llxFooter('$Date$ - $Revision$');

View File

@@ -28,7 +28,8 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path=dirname(__FILE__).'/';
$path=str_replace($script_file,'',$_SERVER["PHP_SELF"]);
$path=preg_replace('@[\\\/]+$@','',$path).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {

View File

@@ -27,7 +27,8 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path=dirname(__FILE__).'/';
$path=str_replace($script_file,'',$_SERVER["PHP_SELF"]);
$path=preg_replace('@[\\\/]+$@','',$path).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {

View File

@@ -14,12 +14,10 @@
class langAutoParser {
private $translatedFiles = array();
private $destLang = '';
private $refLang = '';
private $langDir = '';
private $limittofile = '';
private $time;
private $time_end;
private $destLang = string;
private $refLang = string;
private $langDir = string;
private $limittofile = string;
private $outputpagecode = 'UTF-8';
//private $outputpagecode = 'ISO-8859-1';
const DIR_SEPARATOR = '/';
@@ -48,77 +46,42 @@ class langAutoParser {
if ($this->limittofile && $this->limittofile != $file) continue;
$counter++;
$fileContent = null;
$this->translatedFiles = array();
$refPath = $this->langDir.$this->refLang.self::DIR_SEPARATOR.$file;
$fileContent = file($refPath,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
print "Processing file " . $file . ", with ".sizeof($fileContent)." lines<br>\n";
// Define target dirs
$targetlangs=array($this->destLang);
if ($this->destLang == 'all')
{
$targetlangs=array();
// If we must process all languages
$arraytmp=dol_dir_list($this->langDir,'directories',0);
foreach($arraytmp as $dirtmp)
$destPath = $this->langDir.$this->destLang.self::DIR_SEPARATOR.$file;
$fileContent = file($refPath,FILE_IGNORE_NEW_LINES |
FILE_SKIP_EMPTY_LINES);
print "Processing file " . $file . ", found ".sizeof($fileContent)." records<br>\n";
// Check destination file presence
if ( ! file_exists( $destPath ) ){
// No file presente generate file
echo "File not found: " . $file . "<br>\n";
echo "Generating file " . $file . "<br>\n";
$this->createTranslationFile($destPath);
}
// Translate lines
$fileContentDest = file($destPath,FILE_IGNORE_NEW_LINES |
FILE_SKIP_EMPTY_LINES);
$newlines=0;
foreach($fileContent as $line){
$key = $this->getLineKey($line);
$value = $this->getLineValue($line);
if ($key && $value)
{
if ($dirtmp['name'] === $this->refLang) continue; // We discard source language
$tmppart=explode('_',$dirtmp['name']);
if (preg_match('/^en/i',$dirtmp['name'])) continue; // We discard en_* languages
if (preg_match('/^fr/i',$dirtmp['name'])) continue; // We discard fr_* languages
if (preg_match('/^es/i',$dirtmp['name'])) continue; // We discard es_* languages
if (preg_match('/ca_ES/i',$dirtmp['name'])) continue; // We discard es_CA language
if (preg_match('/pt_BR/i',$dirtmp['name'])) continue; // We discard pt_BR language
if (preg_match('/^\./i',$dirtmp['name'])) continue; // We discard files .*
if (preg_match('/^CVS/i',$dirtmp['name'])) continue; // We discard CVS
$targetlangs[]=$dirtmp['name'];
$newlines+=$this->translateFileLine($fileContentDest,$file,$key,$value);
}
//var_dump($targetlangs);
}
// Process translation of source file for each target languages
foreach($targetlangs as $mydestLang)
{
$this->translatedFiles = array();
$destPath = $this->langDir.$mydestLang.self::DIR_SEPARATOR.$file;
// Check destination file presence
if ( ! file_exists( $destPath ) ){
// No file present, we generate file
echo "File not found: " . $destPath . ". We generate it.<br>\n";
$this->createTranslationFile($destPath,$mydestLang);
}
else
{
echo "Updating file: " . $destPath . "<br>\n";
}
// Translate lines
$fileContentDest = file($destPath,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
$newlines=0;
foreach($fileContent as $line){
$key = $this->getLineKey($line);
$value = $this->getLineValue($line);
if ($key && $value)
{
$newlines+=$this->translateFileLine($fileContentDest,$file,$key,$value,$mydestLang);
}
}
$this->updateTranslationFile($destPath,$file);
echo "New translated lines: " . $newlines . "<br>\n";
#if ($counter ==3) die('fim');
}
$this->updateTranslationFile($destPath,$file);
echo "New translated lines: " . $newlines . "<br>\n";
#if ($counter ==3) die('fim');
}
}
private function updateTranslationFile($destPath,$file)
{
$this->time_end = date('Y-m-d H:i:s');
private function updateTranslationFile($destPath,$file){
if (count($this->translatedFiles[$file])>0)
{
if (count($this->translatedFiles[$file])>0){
$fp = fopen($destPath, 'a');
fwrite($fp, "\r\n");
fwrite($fp, "\r\n");
@@ -127,16 +90,16 @@ class langAutoParser {
foreach( $this->translatedFiles[$file] as $line) {
fwrite($fp, $line . "\r\n");
}
fwrite($fp, "// STOP - Lines generated via autotranslator.php tool (".$this->time_end.").\r\n");
fwrite($fp, "// STOP - Lines generated via autotranslator.php tool (".$this->time.").\r\n");
fclose($fp);
}
return;
}
private function createTranslationFile($path,$mydestlang){
private function createTranslationFile($path){
$fp = fopen($path, 'w+');
fwrite($fp, "/*\r\n");
fwrite($fp, " * Language code: {$mydestlang}\r\n");
fwrite($fp, " * Language code: {$this->destLang}\r\n");
fwrite($fp, " * Automatic generated via autotranslator.php tool\r\n");
fwrite($fp, " * Generation date " . $this->time. "\r\n");
fwrite($fp, " */\r\n");
@@ -145,17 +108,15 @@ class langAutoParser {
}
/**
* Put in array translatedFiles[$file], line of a new tranlated pair
* Put in array translation of a key
*
* @param $content Existing content of dest file
* @param $file Target file name translated (xxxx.lang)
* @param $key Key to translate
* @param $value Existing value in source file
* @param string Language code (ie: fr_FR)
* @return int 0=Nothing translated, 1=Record translated
* @param unknown_type $content Existing content of dest file
* @param unknown_type $file File name translated (xxxx.lang)
* @param unknown_type $key Key to translate
* @param unknown_type $value Existing key in source file
* @return int 0=Nothing translated, 1=Record translated
*/
private function translateFileLine($content,$file,$key,$value,$mydestLang)
{
private function translateFileLine($content,$file,$key,$value){
//print "key =".$key."\n";
foreach( $content as $line ) {
@@ -164,24 +125,16 @@ class langAutoParser {
// If translated return
//print "destKey=".$destKey."\n";
if ( trim($destKey) == trim($key) )
{ // Found already existing translation (key already exits in dest file)
return 0;
{ // Found already existing translation
return 0;
}
}
// If not translated then translate
if ($this->outputpagecode == 'UTF-8') $val=$this->translateTexts(array($value),substr($this->refLang,0,2),substr($this->destLang,0,2));
else $val=utf8_decode($this->translateTexts(array($value),substr($this->refLang,0,2),substr($this->destLang,0,2)));
if ($key == 'CHARSET') $val=$this->outputpagecode;
else if (preg_match('/^Format/',$key)) $val=$value;
else if ($value=='-') $val=$value;
else
{
// If not translated then translate
if ($this->outputpagecode == 'UTF-8') $val=$this->translateTexts(array($value),substr($this->refLang,0,2),substr($mydestLang,0,2));
else $val=utf8_decode($this->translateTexts(array($value),substr($this->refLang,0,2),substr($mydestLang,0,2)));
}
$val=trim($val);
if (empty($val)) return 0;
$this->translatedFiles[$file][] = $key . '=' . $val ;
return 1;
@@ -209,15 +162,8 @@ class langAutoParser {
return $files;
}
/**
* Return translation of a value
*
* @param $src_texts Array with one value
* @param $src_lang
* @param $dest_lang
* @return string Value translated
*/
private function translateTexts($src_texts = array(), $src_lang, $dest_lang){
private function translateTexts($src_texts = array(), $src_lang,
$dest_lang){
$tmp=explode('_',$src_lang);
if ($tmp[0] == $tmp[1]) $src_lang=$tmp[0];
@@ -229,9 +175,9 @@ class langAutoParser {
$lang_pair = $src_lang.'|'.$dest_lang;
$src_texts_query = "";
$src_text_to_translate=preg_replace('/%s/','SSSSS',join('',$src_texts));
$src_texts_query .= "&q=".urlencode($src_text_to_translate);
foreach ($src_texts as $src_text){
$src_texts_query .= "&q=".urlencode($src_text);
}
$url =
"http://ajax.googleapis.com/ajax/services/language/translate?v=1.0".$src_texts_query."&langpair=".urlencode($lang_pair);
@@ -239,8 +185,6 @@ class langAutoParser {
// sendRequest
// note how referer is set manually
//print "Url to translate: ".$url."\n";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@@ -252,16 +196,24 @@ class langAutoParser {
$json = json_decode($body, true);
if ($json['responseStatus'] != 200){
print "Error: ".$json['responseStatus']." ".$url."\n";
return false;
}
$rep=$json['responseData']['translatedText'];
$rep=preg_replace('/SSSSS/','%s',$rep);
$results = $json['responseData'];
//print "OK ".join('',$src_texts).' => '.$rep."\n";
$return_array = array();
return $rep;
foreach ($results as $result){
if ($result['responseStatus'] == 200){
$return_array[] = $result['responseData']['translatedText'];
} else {
$return_array[] = false;
}
}
//return translated text
#return $return_array;
return $json['responseData']['translatedText'];
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

View File

@@ -1,10 +0,0 @@
README (english)
--------------------------------
Rollups
--------------------------------
This directory contains source for the Inkscape vector
graphic editor (www.inkscape.org) to create tshirts.
Note: You may need to install some font to read correctly files
into this directory. For this, see directory doc/font.

View File

@@ -1,281 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="1052.3622"
height="744.09448"
id="svg2953"
version="1.1"
inkscape:version="0.47 r22583"
sodipodi:docname="dolibarr_tshirts.svg">
<defs
id="defs3">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective2959" />
<inkscape:perspective
id="perspective2961"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
y2="1317.5959"
x2="1221.0221"
y1="1026.5248"
x1="1223.7272"
gradientTransform="matrix(0.59172,0,0,0.59172016,-241.72147,287.8142)"
gradientUnits="userSpaceOnUse"
id="linearGradient5510"
xlink:href="#linearGradient3734"
inkscape:collect="always" />
<linearGradient
id="linearGradient3734">
<stop
id="stop3736"
offset="0"
style="stop-color:#0b5b85;stop-opacity:1;" />
<stop
id="stop3738"
offset="1"
style="stop-color:#4fbedf;stop-opacity:1" />
</linearGradient>
<linearGradient
y2="1317.5959"
x2="1221.0221"
y1="1026.5248"
x1="1223.7272"
gradientTransform="matrix(1.3443321,0,0,1.3443323,-84.203155,-604.54637)"
gradientUnits="userSpaceOnUse"
id="linearGradient2969"
xlink:href="#linearGradient3734"
inkscape:collect="always" />
<linearGradient
id="linearGradient2971">
<stop
id="stop2973"
offset="0"
style="stop-color:#0b5b85;stop-opacity:1;" />
<stop
id="stop2975"
offset="1"
style="stop-color:#4fbedf;stop-opacity:1" />
</linearGradient>
<inkscape:perspective
id="perspective3788"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
y2="1317.5959"
x2="1221.0221"
y1="1026.5248"
x1="1223.7272"
gradientTransform="matrix(0.59172,0,0,0.59172016,-238.06681,287.8142)"
gradientUnits="userSpaceOnUse"
id="linearGradient5510-7"
xlink:href="#linearGradient3734-4"
inkscape:collect="always" />
<linearGradient
id="linearGradient3734-4">
<stop
id="stop3736-0"
offset="0"
style="stop-color:#0b5b85;stop-opacity:1;" />
<stop
id="stop3738-9"
offset="1"
style="stop-color:#4fbedf;stop-opacity:1" />
</linearGradient>
<linearGradient
y2="1317.5959"
x2="1221.0221"
y1="1026.5248"
x1="1223.7272"
gradientTransform="matrix(0.59172,0,0,0.59172016,-238.06681,287.8142)"
gradientUnits="userSpaceOnUse"
id="linearGradient3796"
xlink:href="#linearGradient3734-4"
inkscape:collect="always" />
<linearGradient
id="linearGradient3798">
<stop
id="stop3800"
offset="0"
style="stop-color:#0b5b85;stop-opacity:1;" />
<stop
id="stop3802"
offset="1"
style="stop-color:#4fbedf;stop-opacity:1" />
</linearGradient>
<linearGradient
y2="1317.5959"
x2="1221.0221"
y1="1026.5248"
x1="1223.7272"
gradientTransform="matrix(0.64317245,0,0,0.64317264,-265.7108,-221.05337)"
gradientUnits="userSpaceOnUse"
id="linearGradient3808"
xlink:href="#linearGradient3734-4"
inkscape:collect="always" />
<inkscape:perspective
id="perspective3851"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
y2="1317.5959"
x2="1221.0221"
y1="1026.5248"
x1="1223.7272"
gradientTransform="matrix(0.59172,0,0,0.59172016,-239.06564,-128.74015)"
gradientUnits="userSpaceOnUse"
id="linearGradient3808-4"
xlink:href="#linearGradient3734-4-5"
inkscape:collect="always" />
<linearGradient
id="linearGradient3734-4-5">
<stop
id="stop3736-0-5"
offset="0"
style="stop-color:#0b5b85;stop-opacity:1;" />
<stop
id="stop3738-9-1"
offset="1"
style="stop-color:#4fbedf;stop-opacity:1" />
</linearGradient>
<linearGradient
y2="1317.5959"
x2="1221.0221"
y1="1026.5248"
x1="1223.7272"
gradientTransform="matrix(0.59172,0,0,0.59172016,-239.06564,-128.74015)"
gradientUnits="userSpaceOnUse"
id="linearGradient3859"
xlink:href="#linearGradient3734-4-5"
inkscape:collect="always" />
<linearGradient
id="linearGradient3861">
<stop
id="stop3863"
offset="0"
style="stop-color:#0b5b85;stop-opacity:1;" />
<stop
id="stop3865"
offset="1"
style="stop-color:#4fbedf;stop-opacity:1" />
</linearGradient>
<linearGradient
y2="1317.5959"
x2="1221.0221"
y1="1026.5248"
x1="1223.7272"
gradientTransform="matrix(0.64576725,0,0,0.64576741,-264.21722,120.26204)"
gradientUnits="userSpaceOnUse"
id="linearGradient3871"
xlink:href="#linearGradient3734-4-5"
inkscape:collect="always" />
</defs>
<sodipodi:namedview
inkscape:document-units="mm"
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.69799173"
inkscape:cx="509.47445"
inkscape:cy="420.2311"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:snap-global="true"
inkscape:window-width="1280"
inkscape:window-height="968"
inkscape:window-x="-4"
inkscape:window-y="-4"
inkscape:window-maximized="1" />
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-308.2677)">
<text
transform="scale(1.0067426,0.99330258)"
id="text2828-4"
y="621.56976"
x="60.991871"
style="font-size:423.95123291px;font-style:normal;font-weight:normal;fill:url(#linearGradient3808);fill-opacity:1;fill-rule:nonzero;stroke:#010101;stroke-width:2.17207408;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:0.45798322;stroke-dasharray:none;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
style="font-size:247.90473938px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:url(#linearGradient3808);fill-opacity:1;fill-rule:nonzero;stroke:#010101;stroke-width:2.17207408;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:0.45798322;stroke-dasharray:none;font-family:Bauhaus 93;-inkscape-font-specification:Bauhaus 93"
y="621.56976"
x="60.991871"
id="tspan2830-8"
sodipodi:role="line">Dolibarr</tspan></text>
<text
transform="scale(0.92379094,1.082496)"
id="text5484-8"
y="438.42856"
x="875.20703"
style="font-size:40.16991425px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="438.42856"
x="875.20703"
id="tspan5486-2"
sodipodi:role="line"
style="fill:#000000;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial">ERP/CRM</tspan></text>
<text
transform="scale(1.0026876,0.99731961)"
id="text2828-4-7"
y="966.28461"
x="63.803482"
style="font-size:425.66162109px;font-style:normal;font-weight:normal;fill:url(#linearGradient3871);fill-opacity:1;fill-rule:nonzero;stroke:#010101;stroke-width:2.18083692;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:0.45798322;stroke-dasharray:none;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
style="font-size:248.90486145px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:url(#linearGradient3871);fill-opacity:1;fill-rule:nonzero;stroke:#010101;stroke-width:2.18083692;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:0.45798322;stroke-dasharray:none;font-family:Bauhaus 93;-inkscape-font-specification:Bauhaus 93"
y="966.28461"
x="63.803482"
id="tspan2830-8-1"
sodipodi:role="line">Dolibarr</tspan></text>
<text
transform="scale(0.92379094,1.082496)"
id="text5484-8-1"
y="757.02539"
x="877.98615"
style="font-size:40.16991425px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="757.02539"
x="877.98615"
id="tspan5486-2-5"
sodipodi:role="line"
style="fill:#000000;fill-opacity:1;font-family:Arial;-inkscape-font-specification:Arial">ERP/CRM</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -1 +0,0 @@
.htaccess

View File

@@ -4,4 +4,3 @@ google
dolibarr_mail
demo_pwc
phpsane
test.php

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
*
@@ -22,11 +22,11 @@
/**
* \file htdocs/about.php
* \brief About Dolibarr File page
* \brief Fichier page a propos
* \version $Id$
*/
require("./main.inc.php");
require("./pre.inc.php");
$langs->load("admin");
@@ -67,7 +67,7 @@ print '<ul>';
print '<li>';
print '<a target="blank" href="http://www.dolibarr.org/">'.$langs->trans("OfficialWebSite").'</a>';
print '</li>';
// If the French language, it displays French website
// Si langue francaise, on affiche site web francophone
if (preg_match('/^fr_/i',$langs->getDefaultLang()))
{
print '<li>';

View File

@@ -24,7 +24,7 @@
* \brief Fichier de la classe des actions commerciales
* \version $Id$
*/
require_once(DOL_DOCUMENT_ROOT.'/comm/action/cactioncomm.class.php');
require_once(DOL_DOCUMENT_ROOT.'/cactioncomm.class.php');
/** \class ActionComm
@@ -189,7 +189,7 @@ class ActionComm
if (! $notrigger)
{
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php");
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('ACTION_CREATE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
@@ -544,13 +544,13 @@ class ActionComm
* \return string Chaine avec URL
* \remarks Utilise $this->id, $this->code et $this->libelle
*/
function getNomUrl($withpicto=0,$maxlength=0,$classname='',$option='')
function getNomUrl($withpicto=0,$maxlength=0,$class='',$option='')
{
global $langs;
$result='';
if ($option=='birthday') $lien = '<a '.($classname?'class="'.$classname.'" ':'').'href="'.DOL_URL_ROOT.'/contact/perso.php?id='.$this->id.'">';
else $lien = '<a '.($classname?'class="'.$classname.'" ':'').'href="'.DOL_URL_ROOT.'/comm/action/fiche.php?id='.$this->id.'">';
if ($option=='birthday') $lien = '<a '.($class?'class="'.$class.'" ':'').'href="'.DOL_URL_ROOT.'/contact/perso.php?id='.$this->id.'">';
else $lien = '<a '.($class?'class="'.$class.'" ':'').'href="'.DOL_URL_ROOT.'/comm/action/fiche.php?id='.$this->id.'">';
$lienfin='</a>';
if ($langs->trans("Action".$this->type_code) != "Action".$this->type_code || ! $this->libelle)

View File

@@ -28,7 +28,7 @@
* \version $Id$
*/
require_once(DOL_DOCUMENT_ROOT."/core/commonobject.class.php");
require_once(DOL_DOCUMENT_ROOT."/commonobject.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/cotisation.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
@@ -47,7 +47,6 @@ class Adherent extends CommonObject
var $id;
var $ref;
var $civilite_id;
var $prenom;
var $nom;
var $fullname;
@@ -149,7 +148,6 @@ class Adherent extends CommonObject
}
$infos='';
if ($this->civilite_id) $infos.= $langs->trans("UserTitle").": ".$this->getCivilityLabel()."\n";
$infos.= $langs->trans("Lastname").": $this->nom\n";
$infos.= $langs->trans("Firstname").": $this->prenom\n";
$infos.= $langs->trans("Company").": $this->societe\n";
@@ -167,8 +165,7 @@ class Adherent extends CommonObject
// Substitutions
$patterns = array (
'/%CIVILITE%/',
'/%PRENOM%/',
'/%PRENOM%/',
'/%NOM%/',
'/%INFOS%/',
'/%DOL_MAIN_URL_ROOT%/',
@@ -184,7 +181,6 @@ class Adherent extends CommonObject
'/%PASSWORD%/'
);
$replace = array (
$this->getCivilityLabel(),
$this->prenom,
$this->nom,
$infos,
@@ -327,7 +323,7 @@ class Adherent extends CommonObject
if (! $notrigger)
{
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php");
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('MEMBER_CREATE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
@@ -392,8 +388,7 @@ class Adherent extends CommonObject
$this->db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
$sql.= " civilite = ".($this->civilite_id?"'".$this->civilite_id."'":"null");
$sql.= ", prenom = ".($this->prenom?"'".addslashes($this->prenom)."'":"null");
$sql.= " prenom = ".($this->prenom?"'".addslashes($this->prenom)."'":"null");
$sql.= ", nom=" .($this->nom?"'".addslashes($this->nom)."'":"null");
$sql.= ", login=" .($this->login?"'".addslashes($this->login)."'":"null");
$sql.= ", societe=" .($this->societe?"'".addslashes($this->societe)."'":"null");
@@ -497,7 +492,7 @@ class Adherent extends CommonObject
{
if ($this->user_id > 0 && ! $nosyncuser)
{
require_once(DOL_DOCUMENT_ROOT."/user/user.class.php");
require_once(DOL_DOCUMENT_ROOT."/user.class.php");
dol_syslog("Adherent::update update linked user");
@@ -509,7 +504,6 @@ class Adherent extends CommonObject
if ($result >= 0)
{
$luser->civilite_id=$this->civilite_id;
$luser->prenom=$this->prenom;
$luser->nom=$this->nom;
$luser->login=$this->user_login;
@@ -546,7 +540,7 @@ class Adherent extends CommonObject
$this->use_webcal=($conf->global->PHPWEBCALENDAR_MEMBERSTATUS=='always'?1:0);
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php");
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('MEMBER_MODIFY',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
@@ -670,7 +664,7 @@ class Adherent extends CommonObject
$this->use_webcal=($conf->global->PHPWEBCALENDAR_MEMBERSTATUS=='always'?1:0);
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php");
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('MEMBER_DELETE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
@@ -767,7 +761,7 @@ class Adherent extends CommonObject
if ($this->user_id && ! $nosyncuser)
{
require_once(DOL_DOCUMENT_ROOT."/user/user.class.php");
require_once(DOL_DOCUMENT_ROOT."/user.class.php");
// This member is linked with a user, so we also update users informations
// if this is an update.
@@ -795,7 +789,7 @@ class Adherent extends CommonObject
if (! $error && ! $notrigger)
{
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php");
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('MEMBER_NEW_PASSWORD',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
@@ -932,7 +926,7 @@ class Adherent extends CommonObject
{
global $conf, $langs;
$sql = "SELECT d.rowid, d.civilite, d.prenom, d.nom, d.societe, d.fk_soc, d.statut, d.public, d.adresse, d.cp, d.ville, d.note,";
$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, d.fk_soc, d.statut, d.public, d.adresse, d.cp, d.ville, d.note,";
$sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,";
$sql.= " d.photo, d.fk_adherent_type, d.morphy,";
$sql.= " d.datec as datec,";
@@ -952,8 +946,8 @@ class Adherent extends CommonObject
if ($ref) $sql.= " AND d.rowid='".$ref."'";
elseif ($fk_soc) $sql.= " AND d.fk_soc='".$fk_soc."'";
else $sql.= " AND d.rowid=".$rowid;
dol_syslog("Adherent::fetch sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
@@ -963,7 +957,6 @@ class Adherent extends CommonObject
$this->ref = $obj->rowid;
$this->id = $obj->rowid;
$this->civilite_id = $obj->civilite;
$this->prenom = $obj->prenom;
$this->nom = $obj->nom;
$this->fullname = trim($obj->nom.' '.$obj->prenom);
@@ -1016,8 +1009,7 @@ class Adherent extends CommonObject
}
else
{
$this->error=$this->db->lasterror();
dol_syslog("Adherent::fetch ".$this->error, LOG_ERR);
$this->error=$this->db->error();
return -1;
}
}
@@ -1239,7 +1231,7 @@ class Adherent extends CommonObject
$this->use_webcal=($conf->global->PHPWEBCALENDAR_MEMBERSTATUS=='always'?1:0);
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php");
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('MEMBER_SUBSCRIPTION',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
@@ -1294,7 +1286,7 @@ class Adherent extends CommonObject
$this->use_webcal=($conf->global->PHPWEBCALENDAR_MEMBERSTATUS=='always'?1:0);
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php");
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('MEMBER_VALIDATE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
@@ -1342,7 +1334,7 @@ class Adherent extends CommonObject
$this->use_webcal=($conf->global->PHPWEBCALENDAR_MEMBERSTATUS=='always'?1:0);
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php");
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('MEMBER_RESILIATE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
@@ -1707,18 +1699,6 @@ class Adherent extends CommonObject
return '';
}
/**
* \brief Retourne le libelle de civilite du contact
* \return string Nom traduit de la civilite
*/
function getCivilityLabel()
{
global $langs;
$langs->load("dict");
$code=$this->civilite_id;
return $langs->trans("Civility".$code)!="Civility".$code ? $langs->trans("Civility".$code) : $code;
}
/**
* \brief Renvoie nom clicable (avec eventuellement le picto)
@@ -1927,7 +1907,6 @@ class Adherent extends CommonObject
// Initialise parametres
$this->id=0;
$this->specimen=1;
$this->civilite_id = 0;
$this->nom = 'DOLIBARR';
$this->prenom = 'SPECIMEN';
$this->fullname=trim($this->nom.' '.$this->prenom);

View File

@@ -26,7 +26,7 @@
* \version $Id$
*/
require_once(DOL_DOCUMENT_ROOT."/core/commonobject.class.php");
require_once(DOL_DOCUMENT_ROOT."/commonobject.class.php");
/**
@@ -82,7 +82,7 @@ class AdherentType extends CommonObject
function create($userid)
{
global $conf;
$this->statut=trim($this->statut);
$sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type (";
@@ -177,7 +177,7 @@ class AdherentType extends CommonObject
$sql = "SELECT d.rowid, d.libelle, d.statut, d.cotisation, d.mail_valid, d.note, d.vote";
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
$sql .= " WHERE d.rowid = ".$rowid;
dol_syslog("Adherent_type::fetch sql=".$sql);
$resql=$this->db->query($sql);
@@ -200,8 +200,7 @@ class AdherentType extends CommonObject
}
else
{
$this->error=$this->db->lasterror();
dol_syslog("Adherent_type::fetch ".$this->error, LOG_ERR);
$this->error=$this->db->error();
return -1;
}
}
@@ -213,7 +212,7 @@ class AdherentType extends CommonObject
function liste_array()
{
global $conf;
$projets = array();
$sql = "SELECT rowid, libelle";

View File

@@ -21,11 +21,11 @@
/**
* \file htdocs/adherents/card_subscriptions.php
* \ingroup member
* \brief Onglet d'ajout, edition, suppression des adhesions d'un adherent
* \brief Onglet d'ajout, edition, suppression des adh<EFBFBD>sions d'un adh<EFBFBD>rent
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/member.lib.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_type.class.php");

View File

@@ -20,13 +20,13 @@
/**
* \file htdocs/adherents/cartes/carte.php
* \ingroup member
* \ingroup adherent
* \brief Page to output members business cards
* \version $Id$
*/
require("../../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
require_once(DOL_DOCUMENT_ROOT."/includes/modules/member/cards/modules_cards.php");
@@ -94,7 +94,7 @@ if ($result)
$objp->ville,
$objp->pays,
$objp->email,
dol_print_date($objp->naiss,'day'),
$objp->naiss,
$objp->type,
$objp->rowid,
$year,

View File

@@ -25,7 +25,7 @@
* \version $Id$
*/
require("../../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
require_once(DOL_DOCUMENT_ROOT.'/includes/modules/member/PDF_card.class.php');

View File

@@ -0,0 +1,66 @@
<?php
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
\file htdocs/adherents/cartes/pre.inc.php
\ingroup adherent
\brief Fichier de gestion du menu gauche du module adherent
\version $Id$
*/
require("../../main.inc.php");
function llxHeader($head = '', $title='', $help_url='')
{
global $user, $conf, $langs;
top_menu($head);
$menu = new Menu();
$menu->add(DOL_URL_ROOT."/adherents/index.php",$langs->trans("Members"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/fiche.php?action=create",$langs->trans("NewMember"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/liste.php",$langs->trans("List"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/liste.php?statut=-1",$langs->trans("MenuMembersToValidate"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/liste.php?statut=1",$langs->trans("MenuMembersValidated"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/liste.php?statut=1&amp;filter=uptodate",$langs->trans("MenuMembersUpToDate"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/liste.php?statut=0",$langs->trans("MenuMembersResiliated"));
$menu->add(DOL_URL_ROOT."/adherents/public.php?leftmenu=member_public",$langs->trans("MemberPublicLinks"));
$menu->add(DOL_URL_ROOT."/adherents/index.php",$langs->trans("Exports"));
$menu->add_submenu(DOL_URL_ROOT."/exports/index.php?leftmenu=export",$langs->trans("Datas"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/htpasswd.php",$langs->trans("Filehtpasswd"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/cartes/carte.php",$langs->trans("MembersCards"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/cartes/etiquette.php",$langs->trans("MembersTickets"));
$langs->load("compta");
$menu->add(DOL_URL_ROOT."/adherents/index.php",$langs->trans("Accountancy"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/cotisations.php",$langs->trans("Subscriptions"));
$langs->load("banks");
$menu->add_submenu(DOL_URL_ROOT."/compta/bank/",$langs->trans("Bank"));
$menu->add(DOL_URL_ROOT."/adherents/index.php",$langs->trans("Setup"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/type.php",$langs->trans("MembersTypes"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/options.php",$langs->trans("MembersAttributes"));
left_menu($menu->liste);
}
?>

File diff suppressed because it is too large Load Diff

View File

@@ -24,8 +24,6 @@
* \version $Id$
*/
require_once(DOL_DOCUMENT_ROOT."/core/commonobject.class.php");
/**
* \class Cotisation
@@ -280,8 +278,8 @@ class Cotisation extends CommonObject
*/
function info($id)
{
$sql = 'SELECT c.rowid, c.datec,';
$sql.= ' c.tms as datem';
$sql = 'SELECT c.rowid, '.$this->db->pdate('c.datec').' as datec,';
$sql.= ' '.$this->db->pdate('c.tms').' as datem';
$sql.= ' FROM '.MAIN_DB_PREFIX.'cotisation as c';
$sql.= ' WHERE c.rowid = '.$id;
@@ -293,8 +291,8 @@ class Cotisation extends CommonObject
$obj = $this->db->fetch_object($result);
$this->id = $obj->rowid;
$this->date_creation = $this->db->jdate($obj->datec);
$this->date_modification = $this->db->jdate($obj->datem);
$this->date_creation = $obj->datec;
$this->date_modification = $obj->datem;
}
$this->db->free($result);

View File

@@ -25,7 +25,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/cotisation.class.php");
require_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php");
@@ -146,8 +146,8 @@ if ($msg) print $msg.'<br>';
// Liste des cotisations
$sql = "SELECT d.rowid, d.login, d.prenom, d.nom, d.societe,";
$sql.= " c.rowid as crowid, c.cotisation,";
$sql.= " c.dateadh,";
$sql.= " c.datef,";
$sql.= " ".$db->pdate("c.dateadh")." as dateadh,";
$sql.= " ".$db->pdate("c.datef")." as datef,";
$sql.= " c.fk_bank as bank, c.note,";
$sql.= " b.fk_account";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."cotisation as c";
@@ -157,7 +157,7 @@ if (isset($date_select) && $date_select != '')
{
$sql.= " AND dateadh LIKE '$date_select%'";
}
$sql.= $db->order($sortfield,$sortorder);
$sql.= " ORDER BY $sortfield $sortorder";
$sql.= $db->plimit($conf->liste_limit+1, $offset);
$result = $db->query($sql);
@@ -229,7 +229,7 @@ if ($result)
print '<td>';
if ($allowinsertbankafter && $user->rights->banque->modifier && ! $objp->fk_account && $conf->banque->enabled && $conf->global->ADHERENT_BANK_USE && $objp->cotisation)
{
print "<input name=\"label\" type=\"text\" class=\"flat\" size=\"30\" value=\"".$langs->trans("Subscriptions").' '.dol_print_date($db->jdate($objp->dateadh),"%Y")."\" >\n";
print "<input name=\"label\" type=\"text\" class=\"flat\" size=\"30\" value=\"".$langs->trans("Subscriptions").' '.dol_print_date($objp->dateadh,"%Y")."\" >\n";
// print "<td><input name=\"debit\" type=\"text\" size=8></td>";
// print "<td><input name=\"credit\" type=\"text\" size=8></td>";
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
@@ -272,10 +272,10 @@ if ($result)
}
// Date start
print '<td align="center">'.dol_print_date($db->jdate($objp->dateadh),'day')."</td>\n";
print '<td align="center">'.dol_print_date($objp->dateadh,'day')."</td>\n";
// Date end
print '<td align="center">'.dol_print_date($db->jdate($objp->datef),'day')."</td>\n";
print '<td align="center">'.dol_print_date($objp->datef,'day')."</td>\n";
// Price
print '<td align="right">'.price($objp->cotisation).'</td>';

View File

@@ -21,21 +21,20 @@
/**
* \file htdocs/adherents/fiche.php
* \ingroup member
* \brief Page of member
* \brief Page d'ajout, edition, suppression d'une fiche adherent
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/member.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/images.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_options.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/class/cotisation.class.php");
require_once(DOL_DOCUMENT_ROOT."/compta/bank/class/account.class.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formcompany.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_type.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_options.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/cotisation.class.php");
require_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php");
$langs->load("companies");
$langs->load("bills");
@@ -144,7 +143,7 @@ if ($_POST['action'] == 'setsocid')
$thirdparty=new Societe($db);
$thirdparty->fetch($_POST["socid"]);
$error++;
$mesg='<div class="error">'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->nom).'</div>';
$mesg='<div class="error">'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->fullname,$othermember->login,$thirdparty->nom).'</div>';
}
}
@@ -212,8 +211,6 @@ if ($_REQUEST["action"] == 'confirm_sendinfo' && $_REQUEST["confirm"] == 'yes')
if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
{
require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");
$datenaiss='';
if (isset($_POST["naissday"]) && $_POST["naissday"]
&& isset($_POST["naissmonth"]) && $_POST["naissmonth"]
@@ -221,16 +218,17 @@ if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"] && $user->rights->adhe
{
$datenaiss=dol_mktime(12, 0, 0, $_POST["naissmonth"], $_POST["naissday"], $_POST["naissyear"]);
}
//print $_POST["naissmonth"].", ".$_POST["naissday"].", ".$_POST["naissyear"]." ".$datenaiss." ".adodb_strftime('%Y-%m-%d %H:%M:%S',$datenaiss);
// Create new object
if ($result > 0)
{
$adh->oldcopy=dol_clone($adh);
// Change values
$adh->civilite_id = trim($_POST["civilite_id"]);
// Modifie valeures
$adh->prenom = trim($_POST["prenom"]);
$adh->nom = trim($_POST["nom"]);
$adh->fullname = trim($adh->prenom.' '.$adh->nom);
$adh->login = trim($_POST["login"]);
$adh->pass = trim($_POST["pass"]);
@@ -238,9 +236,7 @@ if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"] && $user->rights->adhe
$adh->adresse = trim($_POST["adresse"]);
$adh->cp = trim($_POST["cp"]);
$adh->ville = trim($_POST["ville"]);
$adh->fk_departement = $_POST["departement_id"];
$adh->pays_id = $_POST["pays"];
$adh->pays_id = $_POST["pays"];
$adh->phone = trim($_POST["phone"]);
$adh->phone_perso = trim($_POST["phone_perso"]);
@@ -254,7 +250,7 @@ if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"] && $user->rights->adhe
$adh->amount = $_POST["amount"];
$adh->photo = ($_FILES['photo']['name']?$_FILES['photo']['name']:$adh->oldcopy->photo);
$adh->photo = $_FILES['photo']['name'];
// Get status and public property
$adh->statut = $_POST["statut"];
@@ -287,7 +283,7 @@ if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"] && $user->rights->adhe
$result=$adh->update($user,0,$nosyncuser,$nosyncuserpass);
if ($result >= 0 && ! sizeof($adh->errors))
{
if (!empty($_FILES['photo']['tmp_name']) && trim($_FILES['photo']['tmp_name']))
if (isset($_FILES['photo']['tmp_name']) && trim($_FILES['photo']['tmp_name']))
{
$dir= $conf->adherent->dir_output . '/' . get_exdir($adh->id,2,0,1);
@@ -296,7 +292,7 @@ if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"] && $user->rights->adhe
if (@is_dir($dir))
{
$newfile=$dir.'/'.$_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)
{
$message .= '<div class="error">'.$langs->trans("ErrorFailedToSaveFile").'</div>';
}
@@ -351,14 +347,12 @@ if ($_POST["action"] == 'add' && $user->rights->adherent->creer)
}
$typeid=$_POST["typeid"];
$civilite_id=$_POST["civilite_id"];
$nom=$_POST["nom"];
$prenom=$_POST["prenom"];
$societe=$_POST["societe"];
$adresse=$_POST["adresse"];
$cp=$_POST["cp"];
$ville=$_POST["ville"];
$departement_id=$_POST["departement_id"];
$pays_id=$_POST["pays_id"];
$phone=$_POST["phone"];
@@ -376,14 +370,12 @@ if ($_POST["action"] == 'add' && $user->rights->adherent->creer)
$userid=$_POST["userid"];
$socid=$_POST["socid"];
$adh->civilite_id = $civilite_id;
$adh->prenom = $prenom;
$adh->nom = $nom;
$adh->societe = $societe;
$adh->adresse = $adresse;
$adh->cp = $cp;
$adh->ville = $ville;
$adh->fk_departement = $departement_id;
$adh->pays_id = $pays_id;
$adh->phone = $phone;
$adh->phone_perso = $phone_perso;
@@ -471,7 +463,7 @@ if ($_POST["action"] == 'add' && $user->rights->adherent->creer)
$crowid=$adh->cotisation($datecotisation, $cotisation);
// insertion dans la gestion banquaire si configure pour
if ($conf->global->ADHERENT_BANK_USE)
if ($global->conf->ADHERENT_BANK_USE)
{
$dateop=time();
$amount=$cotisation;
@@ -658,13 +650,10 @@ if ($user->rights->adherent->creer && $_POST["action"] == 'confirm_add_spip' &&
llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_Miembros');
$html = new Form($db);
$htmlcompany = new FormCompany($db);
// fetch optionals attributes and labels
$adho->fetch_name_optionals_label();
$countrynotdefined=$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')';
if ($action == 'edit')
{
@@ -687,24 +676,9 @@ if ($action == 'edit')
$adht->fetch($adh->typeid);
// We set pays_id, and pays_code label of the chosen country
if (isset($_POST["pays"]) || $adh->pays_id)
{
$sql = "SELECT rowid, code, libelle from ".MAIN_DB_PREFIX."c_pays where rowid = ".(isset($_POST["pays"])?$_POST["pays"]:$adh->pays_id);
$resql=$db->query($sql);
if ($resql)
{
$obj = $db->fetch_object($resql);
}
else
{
dol_print_error($db);
}
$adh->pays_id=$obj->rowid;
$adh->pays_code=$obj->code;
$adh->pays=$langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle;
}
/*
* Affichage onglets
*/
$head = member_prepare_head($adh);
dol_fiche_head($head, 'general', $langs->trans("Member"), 0, 'user');
@@ -716,11 +690,11 @@ if ($action == 'edit')
if ($mesg) print '<div class="ok">'.$mesg.'</div>';
$rowspan=17;
$rowspan=15;
$rowspan+=sizeof($adho->attribute_label);
if ($conf->societe->enabled) $rowspan++;
print '<form name="formsoc" action="'.$_SERVER["PHP_SELF"].'" method="post" enctype="multipart/form-data">';
print '<form name="update" action="'.$_SERVER["PHP_SELF"].'" method="post" enctype="multipart/form-data">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
print "<input type=\"hidden\" name=\"rowid\" value=\"$rowid\">";
@@ -735,20 +709,18 @@ if ($action == 'edit')
$morphys["phy"] = $langs->trans("Physical");
$morphys["mor"] = $langs->trans("Morale");
print '<tr><td><span class="fieldrequired">'.$langs->trans("Person").'</span></td><td colspan="2">';
$html->select_array("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$adh->morphy);
$html->select_array("morphy", $morphys, $adh->morphy);
print "</td></tr>";
// Societe
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="2"><input type="text" name="societe" size="40" value="'.(isset($_POST["societe"])?$_POST["societe"]:$adh->societe).'"></td></tr>';
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="2"><input type="text" name="societe" size="40" value="'.$adh->societe.'"></td></tr>';
// Civilite
print '<tr><td width="20%">'.$langs->trans("UserTitle").'</td><td width="35%">';
print $htmlcompany->select_civilite(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$adh->civilite_id)."\n";
print '</td>';
// Nom
print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" size="40" value="'.$adh->nom.'"></td>';
// Photo
print '<td align="center" valign="middle" width="25%" rowspan="'.$rowspan.'">';
print $html->showphoto('memberphoto',$adh)."\n";
print $html->showphoto('memberphoto',$adh);
if ($caneditfieldmember)
{
print '<br><br><table class="nobordernopadding"><tr><td>'.$langs->trans("PhotoFile").'</td></tr>';
@@ -759,25 +731,21 @@ if ($action == 'edit')
print '</td>';
print '</tr>';
// Name
print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" size="40" value="'.(isset($_POST["nom"])?$_POST["nom"]:$adh->nom).'"></td>';
print '</tr>';
// Firstname
print '<tr><td width="20%"><span class="fieldrequired">'.$langs->trans("Firstname").'</span></td><td><input type="text" name="prenom" size="40" value="'.(isset($_POST["prenom"])?$_POST["prenom"]:$adh->prenom).'"></td>';
// Prenom
print '<tr><td width="20%"><span class="fieldrequired">'.$langs->trans("Firstname").'</span></td><td width="35%"><input type="text" name="prenom" size="40" value="'.$adh->prenom.'"></td>';
print '</tr>';
// Login
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").'</span></td><td><input type="text" name="login" size="30" value="'.(isset($_POST["login"])?$_POST["login"]:$adh->login).'"></td></tr>';
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").'</span></td><td><input type="text" name="login" size="30" value="'.$adh->login.'"></td></tr>';
// Password
print '<tr><td><span class="fieldrequired">'.$langs->trans("Password").'</span></td><td><input type="password" name="pass" size="30" value="'.(isset($_POST["pass"])?$_POST["pass"]:$adh->pass).'"></td></tr>';
print '<tr><td><span class="fieldrequired">'.$langs->trans("Password").'</span></td><td><input type="password" name="pass" size="30" value="'.$adh->pass.'"></td></tr>';
// Type
print '<tr><td><span class="fieldrequired">'.$langs->trans("Type").'</span></td><td>';
if ($user->rights->adherent->creer)
{
$html->select_array("typeid", $adht->liste_array(), (isset($_POST["typeid"])?$_POST["typeid"]:$adh->typeid));
$html->select_array("typeid", $adht->liste_array(), $adh->typeid);
}
else
{
@@ -788,42 +756,36 @@ if ($action == 'edit')
// Address
print '<tr><td>'.$langs->trans("Address").'</td><td>';
print '<textarea name="adresse" wrap="soft" cols="40" rows="2">'.(isset($_POST["adresse"])?$_POST["adresse"]:$adh->adresse).'</textarea></td></tr>';
print '<textarea name="adresse" wrap="soft" cols="40" rows="2">'.$adh->adresse.'</textarea></td></tr>';
// Zip / Town
print '<tr><td>'.$langs->trans("Zip").'/'.$langs->trans("Town").'</td><td><input type="text" name="cp" size="6" value="'.(isset($_POST["cp"])?$_POST["cp"]:$adh->cp).'"> <input type="text" name="ville" size="32" value="'.(isset($_POST["ville"])?$_POST["ville"]:$adh->ville).'"></td></tr>';
// Cp
print '<tr><td>'.$langs->trans("Zip").'/'.$langs->trans("Town").'</td><td><input type="text" name="cp" size="6" value="'.$adh->cp.'"> <input type="text" name="ville" size="32" value="'.$adh->ville.'"></td></tr>';
// Country
print '<tr><td>'.$langs->trans("Country").'</td><td>';
$html->select_pays(isset($_POST["pays"])?$_POST["pays"]:$adh->pays_id,'pays',$conf->use_javascript_ajax?' onChange="company_save_refresh_edit()"':'');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
print '</td></tr>';
// State
print '<tr><td>'.$langs->trans('State').'</td><td>';
$htmlcompany->select_departement($adh->fk_departement,$adh->pays_code);
$html->select_pays($adh->pays_code?$adh->pays_code:$mysoc->pays_code,'pays');
print '</td></tr>';
// Tel
print '<tr><td>'.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.(isset($_POST["phone"])?$_POST["phone"]:$adh->phone).'"></td></tr>';
print '<tr><td>'.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.$adh->phone.'"></td></tr>';
// Tel perso
print '<tr><td>'.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.(isset($_POST["phone_perso"])?$_POST["phone_perso"]:$adh->phone_perso).'"></td></tr>';
print '<tr><td>'.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.$adh->phone_perso.'"></td></tr>';
// Tel mobile
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(isset($_POST["phone_mobile"])?$_POST["phone_mobile"]:$adh->phone_mobile).'"></td></tr>';
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.$adh->phone_mobile.'"></td></tr>';
// EMail
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED?'<span class="fieldrequired">':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'</span>':'').'</td><td><input type="text" name="email" size="40" value="'.(isset($_POST["email"])?$_POST["email"]:$adh->email).'"></td></tr>';
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED?'<span class="fieldrequired">':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'</span>':'').'</td><td><input type="text" name="email" size="40" value="'.$adh->email.'"></td></tr>';
// Date naissance
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
$html->select_date(($adh->naiss ? $adh->naiss : -1),'naiss','','',1,'formsoc');
$html->select_date(($adh->naiss ? $adh->naiss : -1),'naiss','','',1,'update');
print "</td></tr>\n";
// Profil public
print "<tr><td>".$langs->trans("Public")."</td><td>\n";
print $html->selectyesno("public",(isset($_POST["public"])?$_POST["public"]:$adh->public),1);
print $html->selectyesno("public",$adh->public,1);
print "</td></tr>\n";
// Attributs supplementaires
@@ -859,7 +821,7 @@ if ($action == 'edit')
print '</td></tr>';
print '<tr><td colspan="3" align="center">';
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
print '<input type="submit" class="button" name="submit" value="'.$langs->trans("Save").'">';
print ' &nbsp; &nbsp; &nbsp; ';
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
print '</td></tr>';
@@ -878,28 +840,6 @@ if ($action == 'create')
/* Fiche creation */
/* */
/* ************************************************************************** */
$adh->fk_departement = $_POST["departement_id"];
// We set pays_id, pays_code and label for the selected country
$adh->pays_id=$_POST["pays_id"]?$_POST["pays_id"]:$conf->global->MAIN_INFO_SOCIETE_PAYS;
if ($adh->pays_id)
{
$sql = "SELECT rowid, code, libelle";
$sql.= " FROM ".MAIN_DB_PREFIX."c_pays";
$sql.= " WHERE rowid = ".$adh->pays_id;
$resql=$db->query($sql);
if ($resql)
{
$obj = $db->fetch_object($resql);
}
else
{
dol_print_error($db);
}
$adh->pays_id=$obj->rowid;
$adh->pays_code=$obj->code;
$adh->pays=$obj->libelle;
}
$adht = new AdherentType($db);
@@ -911,37 +851,32 @@ if ($action == 'create')
}
if ($mesg) print '<div class="ok">'.$mesg.'</div>';
print '<form name="formsoc" action="'.$_SERVER["PHP_SELF"].'" method="post" enctype="multipart/form-data">';
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="post" enctype="multipart/form-data">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="add">';
print '<table class="border" width="100%">';
// Moral-Physique
$morphys["phy"] = $langs->trans("Physical");
$morphys["mor"] = $langs->trans("Moral");
$morphys["phy"] = "Physique";
$morphys["mor"] = "Morale";
print '<tr><td><span class="fieldrequired">'.$langs->trans("Person")."</span></td><td>\n";
$html->select_array("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$adh->morphy, 1);
$html->select_array("morphy", $morphys, $adh->morphy, 1);
print "</td>\n";
// Company
print '<tr><td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.(isset($_POST["societe"])?$_POST["societe"]:$adh->societe).'"></td></tr>';
// Civility
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
print $htmlcompany->select_civilite(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$adh->civilite_id,'civilite_id').'</td>';
print '</tr>';
print '<tr><td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.$adh->societe.'"></td></tr>';
// Nom
print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" value="'.(isset($_POST["nom"])?$_POST["nom"]:$adh->nom).'" size="40"></td>';
print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" value="'.$adh->nom.'" size="40"></td>';
print '</tr>';
// Prenom
print '<tr><td><span class="fieldrequired">'.$langs->trans("Firstname").'</span></td><td><input type="text" name="prenom" size="40" value="'.(isset($_POST["prenom"])?$_POST["prenom"]:$adh->prenom).'"></td>';
print '<tr><td><span class="fieldrequired">'.$langs->trans("Firstname").'</span></td><td><input type="text" name="prenom" size="40" value="'.$adh->prenom.'"></td>';
print '</tr>';
// Login
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").'</span></td><td><input type="text" name="member_login" size="40" value="'.(isset($_POST["member_login"])?$_POST["member_login"]:$adh->login).'"></td></tr>';
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").'</span></td><td><input type="text" name="member_login" size="40" value="'.$adh->login.'"></td></tr>';
// Mot de passe
$generated_password='';
@@ -963,7 +898,7 @@ if ($action == 'create')
$listetype=$adht->liste_array();
if (sizeof($listetype))
{
$html->select_array("typeid", $listetype, isset($_POST["typeid"])?$_POST["typeid"]:$typeid, 1);
$html->select_array("typeid", $listetype, $typeid, 1);
} else {
print '<font class="error">'.$langs->trans("NoTypeDefinedGoToSetup").'</font>';
}
@@ -971,45 +906,31 @@ if ($action == 'create')
// Address
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td>';
print '<textarea name="adresse" wrap="soft" cols="40" rows="2">'.(isset($_POST["adresse"])?$_POST["adresse"]:$adh->adresse).'</textarea></td></tr>';
print '<textarea name="adresse" wrap="soft" cols="40" rows="2">'.$adh->adresse.'</textarea></td></tr>';
// CP / Ville
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td><input type="text" name="cp" size="8" value="'.(isset($_POST["cp"])?$_POST["cp"]:$adh->cp).'"> <input type="text" name="ville" size="32" value="'.(isset($_POST["ville"])?$_POST["ville"]:$adh->ville).'"></td></tr>';
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td><input type="text" name="cp" size="8"> <input type="text" name="ville" size="32" value="'.$adh->ville.'"></td></tr>';
// Country
$adh->pays_id=$adh->pays_id?$adh->pays_id:$mysoc->pays_id;
print '<tr><td>'.$langs->trans("Country").'</td><td>';
$html->select_pays(isset($_POST["pays_id"])?$_POST["pays_id"]:$adh->pays_id,'pays_id',$conf->use_javascript_ajax?' onChange="company_save_refresh_create()"':'');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
print '</td></tr>';
// State
print '<tr><td>'.$langs->trans('State').'</td><td colspan="3">';
if ($adh->pays_id)
{
$htmlcompany->select_departement(isset($_POST["departement_id"])?$_POST["departement_id"]:$adh->fk_departement,$adh->pays_code);
}
else
{
print $countrynotdefined;
}
print '</td></tr>';
// Pays
print '<tr><td>'.$langs->trans("Country").'</td><td>';
$html->select_pays($adh->pays_id ? $adh->pays_id : $mysoc->pays_id,'pays_id');
print '</td></tr>';
// Tel pro
print '<tr><td>'.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.(isset($_POST["phone"])?$_POST["phone"]:$adh->phone).'"></td></tr>';
print '<tr><td>'.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.$adh->phone.'"></td></tr>';
// Tel perso
print '<tr><td>'.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.(isset($_POST["phone_perso"])?$_POST["phone_perso"]:$adh->phone_perso).'"></td></tr>';
print '<tr><td>'.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.$adh->phone_perso.'"></td></tr>';
// Tel mobile
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(isset($_POST["phone_mobile"])?$_POST["phone_mobile"]:$adh->phone_mobile).'"></td></tr>';
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.$adh->phone_mobile.'"></td></tr>';
// EMail
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED?'<span class="fieldrequired">':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'</span>':'').'</td><td><input type="text" name="member_email" size="40" value="'.(isset($_POST["member_email"])?$_POST["member_email"]:$adh->email).'"></td></tr>';
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED?'<span class="fieldrequired">':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'</span>':'').'</td><td><input type="text" name="member_email" size="40" value="'.$adh->email.'"></td></tr>';
// Date naissance
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
$html->select_date(($adh->naiss ? $adh->naiss : -1),'naiss','','',1,'formsoc');
$html->select_date(($adh->naiss ? $adh->naiss : -1),'naiss','','',1,'add');
print "</td></tr>\n";
// Profil public
@@ -1020,7 +941,7 @@ if ($action == 'create')
// Attribut optionnels
foreach($adho->attribute_label as $key=>$value)
{
print "<tr><td>".$value.'</td><td><input type="text" name="options_'.$key.'" size="40" value="'.(isset($_POST["options_".$key])?$_POST["options_".$key]:'').'"></td></tr>'."\n";
print "<tr><td>$value</td><td><input type=\"text\" name=\"options_$key\" size=\"40\"></td></tr>\n";
}
/*
@@ -1056,14 +977,11 @@ if ($rowid && $action != 'edit')
$adh = new Adherent($db);
$adh->id = $rowid;
$res=$adh->fetch($rowid);
if ($res < 0) dol_print_error($db);
$res=$adh->fetch_optionals($rowid);
if ($res < 0) dol_print_error($db);
$adh->fetch($rowid);
$adh->fetch_optionals($rowid);
$adht = new AdherentType($db);
$res=$adht->fetch($adh->typeid);
if ($res < 0) dol_print_error($db);
$adht->fetch($adh->typeid);
$html = new Form($db);
@@ -1176,7 +1094,7 @@ if ($rowid && $action != 'edit')
if ($ret == 'html') print '<br>';
}
$rowspan=15+sizeof($adho->attribute_label);
$rowspan=14+sizeof($adho->attribute_label);
if ($conf->societe->enabled) $rowspan++;
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
@@ -1194,15 +1112,11 @@ if ($rowid && $action != 'edit')
// Company
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur" colspan="2">'.$adh->societe.'</td></tr>';
// Civility
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur" colspan="2">'.$adh->getCivilityLabel().'&nbsp;</td>';
print '</tr>';
// Name
// Nom
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="2">'.$adh->nom.'&nbsp;</td>';
print '</tr>';
// Firstname
// Prenom
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="2">'.$adh->prenom.'&nbsp;</td></tr>';
// Login
@@ -1221,18 +1135,11 @@ if ($rowid && $action != 'edit')
// Address
print '<tr><td>'.$langs->trans("Address").'</td><td class="valeur">'.nl2br($adh->adresse).'</td></tr>';
// Zip / Town
// CP / Ville
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td class="valeur">'.$adh->cp.' '.$adh->ville.'</td></tr>';
// Country
print '<tr><td>'.$langs->trans("Country").'</td><td class="valeur">';
$img=picto_from_langcode($adh->pays_code);
if ($img) print $img.' ';
print getCountry($adh->pays_code);
print '</td></tr>';
// State
print '<tr><td>'.$langs->trans('State').'</td><td class="valeur">'.$adh->departement.'</td>';
// Pays
print '<tr><td>'.$langs->trans("Country").'</td><td class="valeur">'.getCountryLabel($adh->pays_id).'</td></tr>';
// Tel pro.
print '<tr><td>'.$langs->trans("PhonePro").'</td><td class="valeur">'.dol_print_phone($adh->phone,$adh->pays_code,0,$adh->fk_soc,1).'</td></tr>';
@@ -1378,12 +1285,11 @@ if ($rowid && $action != 'edit')
}
// Envoi fiche par mail
if ($adh->statut >= 1)
if ($adh->statut >= 1 && $adh->email)
{
if ($user->rights->adherent->creer)
{
if ($adh->email) print "<a class=\"butAction\" href=\"fiche.php?rowid=$adh->id&action=sendinfo\">".$langs->trans("SendCardByMail")."</a>\n";
else print "<a class=\"butActionRefused\" href=\"#\" title=\"".dol_escape_htmltag($langs->trans("NoEMail"))."\">".$langs->trans("SendCardByMail")."</a>\n";
print "<a class=\"butAction\" href=\"fiche.php?rowid=$adh->id&action=sendinfo\">".$langs->trans("SendCardByMail")."</a>\n";
}
else
{
@@ -1410,7 +1316,7 @@ if ($rowid && $action != 'edit')
if ($user->rights->societe->creer)
{
if ($adh->statut != -1) print '<a class="butAction" href="fiche.php?rowid='.$adh->id.'&amp;action=create_thirdparty">'.$langs->trans("CreateDolibarrThirdParty").'</a>';
else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("CreateDolibarrThirdParty").'</a>';
else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("CreateDolibarrLogin").'</a>';
}
else
{
@@ -1448,11 +1354,11 @@ if ($rowid && $action != 'edit')
$isinspip=$adh->is_in_spip();
if ($isinspip == 1)
{
print "<a class=\"butAction\" href=\"fiche.php?rowid=$adh->id&action=del_spip\">".$langs->trans("DeleteIntoSpip")."</a>\n";
print "<a class=\"butAction\" href=\"fiche.php?rowid=$adh->id&action=del_spip\">Suppression dans Spip</a>\n";
}
if ($isinspip == 0)
{
print "<a class=\"butAction\" href=\"fiche.php?rowid=$adh->id&action=add_spip\">".$langs->trans("AddIntoSpip")."</a>\n";
print "<a class=\"butAction\" href=\"fiche.php?rowid=$adh->id&action=add_spip\">Ajout dans Spip</a>\n";
}
if ($isinspip == -1) {
print '<br><font class="error">Failed to connect to SPIP: '.$adh->error.'</font>';

View File

@@ -23,7 +23,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/member.lib.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/cotisation.class.php");

View File

@@ -19,14 +19,14 @@
*/
/**
* \file htdocs/adherents/htpasswd.php
* \ingroup member
* \brief Page d'export htpasswd du fichier des adherents
* \author Rodolphe Quiedeville
* \version $Id$
*/
\file htdocs/adherents/htpasswd.php
\ingroup member
\brief Page d'export htpasswd du fichier des adherents
\author Rodolphe Quiedeville
\version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT.'/lib/security.lib.php');
llxHeader();
@@ -46,14 +46,14 @@ if (! isset($cotis))
$sql = "SELECT d.login, d.pass, d.datefin";
$sql = "SELECT d.login, d.pass, ".$db->pdate("d.datefin")." as datefin";
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d ";
$sql .= " WHERE d.statut = $statut ";
if ($cotis==1)
{
$sql .= " AND datefin > ".$db->idate(mktime());
}
$sql.= $db->order($sortfield,$sortorder);
$sql.= " ORDER BY $sortfield $sortorder";
//$sql.=$db->plimit($conf->liste_limit, $offset);
$resql = $db->query($sql);

View File

@@ -24,7 +24,7 @@
* \brief Page accueil module adherents
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_type.class.php");
@@ -189,11 +189,11 @@ print "<br>\n";
$max=5;
$sql = "SELECT a.rowid, a.statut, a.nom, a.prenom,";
$sql.= " a.tms as datem, datefin as date_end_subscription,";
$sql.= " ".$db->pdate("a.tms")." as datem, ".$db->pdate("datefin")." as date_end_subscription,";
$sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
$sql.= " WHERE a.fk_adherent_type = ta.rowid";
$sql.= $db->order("a.tms","DESC");
$sql.= " ORDER BY a.tms DESC";
$sql.= $db->plimit($max, 0);
$resql=$db->query($sql);
@@ -219,8 +219,8 @@ if ($resql)
$statictype->libelle=$obj->libelle;
print '<td>'.$staticmember->getNomUrl(1,24).'</td>';
print '<td>'.$statictype->getNomUrl(1,16).'</td>';
print '<td>'.dol_print_date($db->jdate($obj->datem),'dayhour').'</td>';
print '<td align="right">'.$staticmember->LibStatut($obj->statut,($obj->cotisation=='yes'?1:0),$db->jdate($obj->date_end_subscription),5).'</td>';
print '<td>'.dol_print_date($obj->datem,'dayhour').'</td>';
print '<td align="right">'.$staticmember->LibStatut($obj->statut,($obj->cotisation=='yes'?1:0),$obj->date_end_subscription,5).'</td>';
print '</tr>';
$i++;
}
@@ -240,7 +240,7 @@ $Number=array();
$tot=0;
$numb=0;
$sql = "SELECT c.cotisation, c.dateadh";
$sql = "SELECT c.cotisation, ".$db->pdate("c.dateadh")." as dateadh";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."cotisation as c";
$sql.= " WHERE d.rowid = c.fk_adherent";
if(isset($date_select) && $date_select != '')
@@ -255,7 +255,7 @@ if ($result)
while ($i < $num)
{
$objp = $db->fetch_object($result);
$year=dol_print_date($db->jdate($objp->dateadh),"%Y");
$year=dol_print_date($objp->dateadh,"%Y");
$Total[$year]=(isset($Total[$year])?$Total[$year]:0)+$objp->cotisation;
$Number[$year]=(isset($Number[$year])?$Number[$year]:0)+1;
$tot+=$objp->cotisation;
@@ -298,6 +298,10 @@ print '</td></tr>';
print '</table>';
$db->close();
llxFooter('$Date$ - $Revision$');

View File

@@ -24,7 +24,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/member.lib.php");

View File

@@ -24,7 +24,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/member.lib.php");

View File

@@ -24,7 +24,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/member.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/ldap.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/ldap.lib.php");

View File

@@ -25,7 +25,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_type.class.php");
@@ -72,7 +72,7 @@ $form=new Form($db);
$membertypestatic=new AdherentType($db);
$sql = "SELECT d.rowid, d.login, d.prenom, d.nom, d.societe, ";
$sql.= " d.datefin,";
$sql.= " ".$db->pdate("d.datefin")." as datefin,";
$sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
$sql.= " t.libelle as type, t.cotisation";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
@@ -218,8 +218,6 @@ if ($resql)
{
$objp = $db->fetch_object($resql);
$datefin=$db->jdate($objp->datefin);
$adh=new Adherent($db);
// Nom
@@ -252,20 +250,20 @@ if ($resql)
// Statut
print '<td nowrap="nowrap">';
print $adh->LibStatut($objp->statut,$objp->cotisation,$datefin,2);
print $adh->LibStatut($objp->statut,$objp->cotisation,$objp->datefin,2);
print "</td>";
// Date fin cotisation
if ($datefin)
if ($objp->datefin)
{
print '<td align="center" nowrap="nowrap">';
if ($datefin < time() && $objp->statut > 0)
if ($objp->datefin < time() && $objp->statut > 0)
{
print dol_print_date($datefin,'day')." ".img_warning($langs->trans("SubscriptionLate"));
print dol_print_date($objp->datefin,'day')." ".img_warning($langs->trans("SubscriptionLate"));
}
else
{
print dol_print_date($datefin,'day');
print dol_print_date($objp->datefin,'day');
}
print '</td>';
}

View File

@@ -24,7 +24,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT.'/lib/member.lib.php');
require_once(DOL_DOCUMENT_ROOT.'/adherents/adherent.class.php');

View File

@@ -25,7 +25,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require(DOL_DOCUMENT_ROOT."/adherents/adherent_options.class.php");
$langs->load("members");

View File

@@ -0,0 +1,70 @@
<?php
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/** \file htdocs/adherents/pre.inc.php
* \ingroup member
* \brief Fichier de gestion du menu gauche du module adherent
* \version $Id$
*/
require("../main.inc.php");
function llxHeader($head = '', $title='', $help_url='')
{
global $user, $conf, $langs;
$langs->load("members");
top_menu($head, $title);
$menu = new Menu();
$menu->add(DOL_URL_ROOT."/adherents/index.php",$langs->trans("Members"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/fiche.php?action=create",$langs->trans("NewMember"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/liste.php",$langs->trans("List"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/liste.php?statut=-1",$langs->trans("MenuMembersToValidate"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/liste.php?statut=1",$langs->trans("MenuMembersValidated"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/liste.php?statut=1&amp;filter=outofdate",$langs->trans("MenuMembersNotUpToDate"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/liste.php?statut=1&amp;filter=uptodate",$langs->trans("MenuMembersUpToDate"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/liste.php?statut=0",$langs->trans("MenuMembersResiliated"));
$menu->add(DOL_URL_ROOT."/adherents/public.php?leftmenu=member_public",$langs->trans("MemberPublicLinks"));
$menu->add(DOL_URL_ROOT."/adherents/index.php",$langs->trans("Exports"));
$menu->add_submenu(DOL_URL_ROOT."/exports/index.php?leftmenu=export",$langs->trans("Datas"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/htpasswd.php",$langs->trans("Filehtpasswd"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/cartes/carte.php",$langs->trans("MembersCards"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/cartes/etiquette.php",$langs->trans("MembersTickets"));
$langs->load("compta");
$menu->add(DOL_URL_ROOT."/adherents/index.php",$langs->trans("Accountancy"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/cotisations.php",$langs->trans("Subscriptions"));
$langs->load("banks");
$menu->add_submenu(DOL_URL_ROOT."/compta/bank/",$langs->trans("Banks"));
$menu->add(DOL_URL_ROOT."/adherents/index.php",$langs->trans("Setup"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/type.php",$langs->trans("MembersTypes"));
$menu->add_submenu(DOL_URL_ROOT."/adherents/options.php",$langs->trans("MembersAttributes"));
left_menu($menu->liste, $help_url);
}
?>

View File

@@ -25,7 +25,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
@@ -48,10 +48,12 @@ print '<br>';
print '<table class="border" cellspacing="0" cellpadding="3">';
print '<tr class="liste_titre"><td>'.$langs->trans("Description").'</td><td>'.$langs->trans("URL").'</td></tr>';
// Should work with DOL_URL_ROOT='' or DOL_URL_ROOT='/dolibarr'
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',$dolibarr_main_url_root);
print '<tr><td>'.$langs->trans("BlankSubscriptionForm").'</td><td><a target="_blank" href="'.DOL_URL_ROOT.'/public/members/new.php'.'">'.$urlwithouturlroot.DOL_URL_ROOT.'/public/members/new.php'.'</a></td></tr>';
print '<tr><td>'.$langs->trans("PublicMemberList").'</td><td><a target="_blank" href="'.DOL_URL_ROOT.'/public/members/public_list.php'.'">'.$urlwithouturlroot.DOL_URL_ROOT.'/public/members/public_list.php'.'</a></td></tr>';
print '<tr><td>'.$langs->trans("PublicMemberCard").'</td><td>'.$urlwithouturlroot.DOL_URL_ROOT.'/public/members/public_card.php?id=xxx'.'</td></tr>';
$firstpart=$dolibarr_main_url_root;
$regex='/'.DOL_URL_ROOT.'$/i';
$firstpart=preg_replace($regex,'',$firstpart);
print '<tr><td>'.$langs->trans("BlankSubscriptionForm").'</td><td><a target="_blank" href="'.DOL_URL_ROOT.'/public/members/new.php'.'">'.$firstpart.DOL_URL_ROOT.'/public/members/new.php'.'</a></td></tr>';
print '<tr><td>'.$langs->trans("PublicMemberList").'</td><td><a target="_blank" href="'.DOL_URL_ROOT.'/public/members/public_list.php'.'">'.$firstpart.DOL_URL_ROOT.'/public/members/public_list.php'.'</a></td></tr>';
print '<tr><td>'.$langs->trans("PublicMemberCard").'</td><td>'.$firstpart.DOL_URL_ROOT.'/public/members/public_card.php?id=xxx'.'</td></tr>';
print '</table>';

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_type.class.php");
@@ -128,8 +128,11 @@ llxHeader('',$langs->trans("MembersTypeSetup"),'EN:Module_Foundations|FR:Module_
$form=new Form($db);
// Liste of members type
/* ************************************************************************** */
/* */
/* Liste des types d'adh<64>rents */
/* */
/* ************************************************************************** */
if (! $rowid && $_GET["action"] != 'create' && $_GET["action"] != 'edit')
{
@@ -214,7 +217,7 @@ if ($_GET["action"] == 'create')
print '<input type="hidden" name="action" value="add">';
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input type="text" name="libelle" size="40"></td></tr>';
print '<tr><td>'.$langs->trans("Label").'</td><td><input type="text" name="libelle" size="40"></td></tr>';
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
print $htmls->selectyesno("cotisation",1,1);
@@ -242,13 +245,11 @@ if ($_GET["action"] == 'create')
}
print '</td></tr>';
print "</table>\n";
print '<br>';
print '<center><input type="submit" name="button" class="button" value="'.$langs->trans("Add").'"> &nbsp; &nbsp; ';
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'"></center>';
print '<tr><td colspan="2" align="center"><input type="submit" name="button" class="button" value="'.$langs->trans("Add").'"> &nbsp;';
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'"></td></tr>';
print "</form>\n";
print "</table>\n";
}
/* ************************************************************************** */
@@ -333,7 +334,7 @@ if ($rowid > 0)
$membertypestatic=new AdherentType($db);
$sql = "SELECT d.rowid, d.login, d.prenom, d.nom, d.societe, ";
$sql.= " d.datefin,";
$sql.= " ".$db->pdate("d.datefin")." as datefin,";
$sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
$sql.= " t.libelle as type, t.cotisation";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
@@ -484,8 +485,6 @@ if ($rowid > 0)
{
$objp = $db->fetch_object($resql);
$datefin=$db->jdate($objp->datefin);
$adh=new Adherent($db);
// Nom
@@ -519,20 +518,20 @@ if ($rowid > 0)
// Statut
print '<td nowrap="nowrap">';
print $adh->LibStatut($objp->statut,$objp->cotisation,$datefin,2);
print $adh->LibStatut($objp->statut,$objp->cotisation,$objp->datefin,2);
print "</td>";
// Date fin cotisation
if ($datefin)
if ($objp->datefin)
{
print '<td align="center" nowrap="nowrap">';
if ($datefin < time() && $objp->statut > 0)
if ($objp->datefin < time() && $objp->statut > 0)
{
print dol_print_date($datefin,'day')." ".img_warning($langs->trans("SubscriptionLate"));
print dol_print_date($objp->datefin,'day')." ".img_warning($langs->trans("SubscriptionLate"));
}
else
{
print dol_print_date($datefin,'day');
print dol_print_date($objp->datefin,'day');
}
print '</td>';
}

View File

@@ -24,7 +24,7 @@
* \version $Id$
*/
require("../main.inc.php");
require('./pre.inc.php');
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
$langs->load('admin');

View File

@@ -27,7 +27,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
$langs->load("admin");
@@ -189,28 +189,31 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 1)
/*
* Spip
*/
$var=!$var;
if ($conf->global->ADHERENT_USE_SPIP)
if ($conf->global->MAIN_FEATURES_LEVEL >= 1)
{
$lien=img_tick().' ';
$lien.='<a href="'.DOL_URL_ROOT.'/admin/adherent.php?action=unset&value=0&name=ADHERENT_USE_SPIP">'.$langs->trans("Disable").'</a>';
// Edition des varibales globales rattache au theme Mailman
$constantes=array('ADHERENT_USE_SPIP_AUTO',
'ADHERENT_SPIP_SERVEUR',
'ADHERENT_SPIP_DB',
'ADHERENT_SPIP_USER',
'ADHERENT_SPIP_PASS'
);
print_fiche_titre("SPIP CMS",$lien,'');
form_constantes($constantes);
}
else
{
$lien='<a href="'.DOL_URL_ROOT.'/admin/adherent.php?action=set&value=1&name=ADHERENT_USE_SPIP">'.$langs->trans("Activate").'</a>';
print_fiche_titre("SPIP - CMS",$lien,'');
}
$var=!$var;
if ($conf->global->ADHERENT_USE_SPIP)
{
$lien=img_tick().' ';
$lien.='<a href="adherent.php?action=unset&value=0&name=ADHERENT_USE_SPIP">'.$langs->trans("Disable").'</a>';
// Edition des varibales globales rattache au theme Mailman
$constantes=array('ADHERENT_USE_SPIP_AUTO',
'ADHERENT_SPIP_SERVEUR',
'ADHERENT_SPIP_DB',
'ADHERENT_SPIP_USER',
'ADHERENT_SPIP_PASS'
);
print_fiche_titre("SPIP - Systeme de publication en ligne",$lien,'');
form_constantes($constantes);
}
else
{
$lien='<a href="adherent.php?action=set&value=1&name=ADHERENT_USE_SPIP">'.$langs->trans("Activate").'</a>';
print_fiche_titre("SPIP - Systeme de publication en ligne",$lien,'');
}
print "<hr>\n";
print "<hr>\n";
}
/*
* Edition info modele document

View File

@@ -23,7 +23,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/agenda.lib.php");

View File

@@ -23,7 +23,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT.'/lib/agenda.lib.php');

View File

@@ -24,9 +24,9 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT.'/compta/facture/facture.class.php');
require_once(DOL_DOCUMENT_ROOT.'/facture.class.php');
$langs->load("admin");
$langs->load("companies");

View File

@@ -25,7 +25,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/includes/barcode/html.formbarcode.class.php");
@@ -236,7 +236,7 @@ if (! isset($_SERVER['WINDIR']))
print '<td>'.$langs->trans("GenbarcodeLocation").'</td>';
print '<td width="60" align="center">';
print '<input type="text" size="40" name="genbarcodelocation" value="'.$conf->global->GENBARCODE_LOCATION.'">';
if (! empty($conf->global->GENBARCODE_LOCATION) && ! @file_exists($conf->global->GENBARCODE_LOCATION))
if (! empty($conf->global->GENBARCODE_LOCATION) && ! file_exists($conf->global->GENBARCODE_LOCATION))
{
$langs->load("errors");
print '<br><font class="error">'.$langs->trans("ErrorFileNotFound",$conf->global->GENBARCODE_LOCATION).'</font>';

View File

@@ -23,7 +23,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
$langs->load("admin");

View File

@@ -22,13 +22,13 @@
*/
/**
* \file htdocs/admin/boutique.php
* \ingroup boutique
* \brief Page d'administration/configuration du module OsCommerce
* \version $Revision$
\file htdocs/admin/boutique.php
\ingroup boutique
\brief Page d'administration/configuration du module OsCommerce
\version $Revision$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
$langs->load("admin");

View File

@@ -1,7 +1,6 @@
<?php
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,12 +18,12 @@
*/
/**
* \file htdocs/admin/boxes.php
* \brief Page to setup boxes
* \version $Id$
*/
\file htdocs/admin/boxes.php
\brief Page d'administration/configuration des boites
\version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
include_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
@@ -33,7 +32,7 @@ $langs->load("admin");
if (!$user->admin)
accessforbidden();
// Definition des positions possibles pour les boites
// D<EFBFBD>finition des positions possibles pour les boites
$pos_array = array(0); // Positions possibles pour une boite (0,1,2,...)
$pos_name = array(0=>$langs->trans("Home")); // Nom des positions 0=Homepage, 1=...
$boxes = array();
@@ -49,47 +48,33 @@ if ((isset($_POST["action"]) && $_POST["action"] == 'addconst'))
if ($_POST["action"] == 'add')
{
$sql = "SELECT rowid";
$sql.= " FROM ".MAIN_DB_PREFIX."boxes";
$sql.= " WHERE fk_user = 0";
$sql.= " AND box_id = ".$_POST["boxid"];
$sql.= " AND position = ".$_POST["pos"];
$resql = $db->query($sql);
dol_syslog("boxes.php::search if box active sql=".$sql);
$sql.= " FROM ".MAIN_DB_PREFIX."boxes";
$sql.= " WHERE fk_user=0 AND box_id=".$_POST["boxid"]." AND position=".$_POST["pos"];
$resql = $db->query($sql);
dol_syslog("boxes.php::search if box active sql=".$sql);
if ($resql)
{
$num = $db->num_rows($resql);
if ($num == 0)
{
$db->begin();
{
$num = $db->num_rows($resql);
if ($num == 0)
{
$db->begin();
// Si la boite n'est pas deja active, insert with box_order=''
$sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes (";
$sql.= "box_id";
$sql.= ", position";
$sql.= ", box_order";
$sql.= ", fk_user";
$sql.= ") values (";
$sql.= $_POST["boxid"];
$sql.= ", ".$_POST["pos"];
$sql.= ", ''";
$sql.= ", 0";
$sql.= ")";
$sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes (box_id, position, box_order, fk_user) values (".$_POST["boxid"].",".$_POST["pos"].", '', 0)";
dol_syslog("boxes.php activate box sql=".$sql);
$resql = $db->query($sql);
$resql = $db->query($sql);
// Remove all personalized setup when a box is activated or disabled
// Remove all personalized setup when a box is activated or disabled
$sql = "DELETE FROM ".MAIN_DB_PREFIX."user_param";
$sql.= " WHERE param LIKE 'MAIN_BOXES_%'";
$sql.= " WHERE param like 'MAIN_BOXES_%'";
dol_syslog("boxes.php delete user_param sql=".$sql);
$resql = $db->query($sql);
$resql = $db->query($sql);
$db->commit();
}
Header("Location: boxes.php");
exit;
exit;
}
else
{
@@ -100,15 +85,15 @@ if ($_POST["action"] == 'add')
if ($_GET["action"] == 'delete')
{
$db->begin();
$sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes";
$sql.= " WHERE rowid=".$_GET["rowid"];
$resql = $db->query($sql);
$sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes";
$sql.= " WHERE rowid=".$_GET["rowid"];
$resql = $db->query($sql);
// Remove all personalized setup when a box is activated or disabled
$sql = "DELETE FROM ".MAIN_DB_PREFIX."user_param";
$sql.= " WHERE param LIKE 'MAIN_BOXES_%'";
$resql = $db->query($sql);
// Remove all personalized setup when a box is activated or disabled
$sql = "DELETE FROM ".MAIN_DB_PREFIX."user_param";
$sql.= " WHERE param like 'MAIN_BOXES_%'";
$resql = $db->query($sql);
$db->commit();
}
@@ -116,34 +101,35 @@ if ($_GET["action"] == 'delete')
if ($_GET["action"] == 'switch')
{
// On permute les valeur du champ box_order des 2 lignes de la table boxes
$db->begin();
$db->begin();
$objfrom=new ModeleBoxes($db);
$objfrom->fetch($_GET["switchfrom"]);
$objto=new ModeleBoxes($db);
$objto->fetch($_GET["switchto"]);
if (is_object($objfrom) && is_object($objto))
{
$sql="UPDATE ".MAIN_DB_PREFIX."boxes set box_order='".$objto->box_order."' WHERE rowid=".$objfrom->rowid;
$objfrom=new ModeleBoxes($db);
$objfrom->fetch($_GET["switchfrom"]);
$objto=new ModeleBoxes($db);
$objto->fetch($_GET["switchto"]);
if (is_object($objfrom) && is_object($objto))
{
$sql="UPDATE ".MAIN_DB_PREFIX."boxes set box_order='".$objto->box_order."' WHERE rowid=".$objfrom->rowid;
//print "xx".$sql;
$resultupdatefrom = $db->query($sql);
if (! $resultupdatefrom) { dol_print_error($db); }
$sql="UPDATE ".MAIN_DB_PREFIX."boxes set box_order='".$objfrom->box_order."' WHERE rowid=".$objto->rowid;
$resultupdatefrom = $db->query($sql);
if (! $resultupdatefrom) { dol_print_error($db); }
$sql="UPDATE ".MAIN_DB_PREFIX."boxes set box_order='".$objfrom->box_order."' WHERE rowid=".$objto->rowid;
//print "xx".$sql;
$resultupdateto = $db->query($sql);
if (! $resultupdateto) { dol_print_error($db); }
}
$resultupdateto = $db->query($sql);
if (! $resultupdateto) { dol_print_error($db); }
}
if ($resultupdatefrom && $resultupdateto)
{
$db->commit();
}
else
{
$db->rollback();
}
if ($resultupdatefrom && $resultupdateto)
{
$db->commit();
}
else
{
$db->rollback();
}
}
@@ -180,11 +166,11 @@ if ($resql)
$obj = $db->fetch_object($resql);
$boxes[$obj->position][$obj->box_id]=1;
$i++;
array_push($actives,$obj->box_id);
if ($obj->box_order == '' || $obj->box_order == '0' || $decalage) $decalage++;
// On renumerote l'ordre des boites si l'une d'elle est a ''
// On renum<EFBFBD>rote l'ordre des boites si l'une d'elle est <EFBFBD> ''
// This occurs just after an insert.
if ($decalage)
{
@@ -266,29 +252,20 @@ $var=True;
if ($resql)
{
$html=new Form($db);
$num = $db->num_rows($resql);
$i = 0;
// Boucle sur toutes les boites
while ($i < $num)
{
$obj = $db->fetch_object($resql);
if (preg_match('/^([^@]+)@([^@]+)$/i',$obj->file,$regs))
{
$module = $regs[1];
$sourcefile = "/".$regs[2]."/inc/boxes/".$module.".php";
}
else
{
$module=preg_replace('/.php$/i','',$obj->file);
$sourcefile = "/includes/boxes/".$module.".php";
}
include_once(DOL_DOCUMENT_ROOT.$sourcefile);
$module=preg_replace('/.php$/i','',$obj->file);
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/".$module.".php");
$box=new $module($db,$obj->note);
// if (in_array($obj->rowid, $actives) && $box->box_multiple <> 1)
if (in_array($obj->rowid, $actives))
{
@@ -297,23 +274,15 @@ if ($resql)
else
{
$var = ! $var;
if (preg_match('/^([^@]+)@([^@]+)$/i',$box->boximg))
{
$logo = $box->boximg;
}
else
{
$logo=preg_replace("/^object_/i","",$box->boximg);
}
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
$logo=preg_replace("/^object_/i","",$box->boximg);
print '<tr '.$bc[$var].'>';
print '<td>'.img_object("",$logo).' '.$box->boxlabel.'</td>';
print '<td>' . ($obj->note?$obj->note:'&nbsp;') . '</td>';
print '<td>' . $sourcefile . '</td>';
print '<td>' . $obj->file . '</td>';
// Pour chaque position possible, on affiche un lien
// d'activation si boite non deja active pour cette position
print '<td align="center">';
@@ -322,19 +291,19 @@ if ($resql)
print '<input type="hidden" name="boxid" value="'.$obj->rowid.'">';
print ' <input type="submit" class="button" name="button" value="'.$langs->trans("Activate").'">';
print '</td>';
print '</tr></form>';
}
$i++;
}
$db->free($resql);
}
print '</table>';
/*
* Boites activees
* Boites activ<EFBFBD>es
*
*/
@@ -365,41 +334,23 @@ if ($resql)
$num = $db->num_rows($resql);
$i = 0;
$var=true;
$box_order=1;
$foundrupture=1;
// On lit avec un coup d'avance
$obj = $db->fetch_object($resql);
while ($obj && $i < $num)
{
$var = ! $var;
$objnext = $db->fetch_object($resql);
if (preg_match('/^([^@]+)@([^@]+)$/i',$obj->file,$regs))
{
$module = $regs[1];
$sourcefile = "/".$regs[2]."/inc/boxes/".$module.".php";
}
else
{
$module=preg_replace('/.php$/i','',$obj->file);
$sourcefile = "/includes/boxes/".$module.".php";
}
include_once(DOL_DOCUMENT_ROOT.$sourcefile);
$module=preg_replace('/.php$/i','',$obj->file);
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/".$module.".php");
$box=new $module($db,$obj->note);
if (preg_match('/^([^@]+)@([^@]+)$/i',$box->boximg))
{
$logo = $box->boximg;
}
else
{
$logo=preg_replace("/^object_/i","",$box->boximg);
}
$logo=preg_replace("/^object_/i","",$box->boximg);
print '<tr '.$bc[$var].'>';
print '<td>'.img_object("",$logo).' '.$box->boxlabel.'</td>';
print '<td>' . ($obj->note?$obj->note:'&nbsp;') . '</td>';
@@ -416,17 +367,17 @@ if ($resql)
print '<td align="center">';
print '<a href="boxes.php?rowid='.$obj->rowid.'&amp;action=delete">'.img_delete().'</a>';
print '</td>';
print "</tr>\n";
$i++;
$box_order++;
if (! $foundrupture) $objprevious = $obj;
else $box_order=1;
$obj=$objnext;
}
$db->free($resql);
}

View File

@@ -23,9 +23,9 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/product/html.formproduct.class.php");
require_once(DOL_DOCUMENT_ROOT."/html.formproduct.class.php");
// If socid provided by ajax company selector
if (! empty($_REQUEST['CASHDESK_ID_THIRDPARTY_id']))

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.org>
* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.org>
*
* 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
@@ -16,15 +16,14 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/** \file htdocs/admin/clicktodial.php
\ingroup clicktodial
\brief Page d'administration/configuration du module clicktodial
\version $Id$
*/
/**
* \file htdocs/admin/clicktodial.php
* \ingroup clicktodial
* \brief Page d'administration/configuration du module clicktodial
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
$langs->load("admin");
@@ -52,8 +51,7 @@ if ($_POST["action"] == 'setvalue' && $user->admin)
*
*/
$wikihelp='EN:Module_ClickToDial_En|FR:Module_ClickToDial|ES:Módulo_ClickTodial_Es';
llxHeader($langs->trans("ClickToDialSetup"),'',$wikihelp);
llxHeader();
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print_fiche_titre($langs->trans("ClickToDialSetup"),$linkback,'setup');

View File

@@ -29,7 +29,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php');

View File

@@ -25,7 +25,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/images.lib.php");
@@ -557,7 +557,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
else
{
/*
* Show parameters
* Affichage des parametres
*/
if ($message) print $message.'<br>';
@@ -689,7 +689,7 @@ else
if ($langs->transcountry("ProfId1",$code_pays) != '-')
{
print $conf->global->MAIN_INFO_SIREN;
if ($conf->global->MAIN_INFO_SIREN && $code_pays == 'FR') print ' &nbsp; <a href="http://avis-situation-sirene.insee.fr/avisitu/jsp/avis.jsp" target="_blank">'.$langs->trans("Check").'</a>';
if ($code_pays == 'FR') print ' &nbsp; <a href="http://avis-situation-sirene.insee.fr/avisitu/jsp/avis.jsp" target="_blank">'.$langs->trans("Check").'</a>';
}
print '</td></tr>';
}

View File

@@ -25,7 +25,7 @@
* \version $Id$
*/
require("../main.inc.php");
require('./pre.inc.php');
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
$langs->load('admin');

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
*
@@ -19,13 +19,13 @@
*/
/**
* \file htdocs/admin/confexped.php
* \ingroup produit
* \brief Page to setup sending module
* \version $Id$
*/
\file htdocs/admin/confexped.php
\ingroup produit
\brief Page d'administration/configuration du module Expedition
\version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
$langs->load("admin");
@@ -112,22 +112,28 @@ print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Feature").'</td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="center" width="100">'.$langs->trans("Status").'</td>';
print '<td align="center" width="100">'.$langs->trans("Action").'</td>';
print "</tr>\n";
print "<input type=\"hidden\" name=\"action\" value=\"sending\">";
print "<tr ".$bc[$var].">";
print '<td>'.$langs->trans("SendingsAbility").'</td>';
print '<td align="center" width="20">';
if($conf->global->MAIN_SUBMODULE_EXPEDITION == 1)
{
print img_tick();
}
print '</td>';
print '<td align="center" width="100">';
if($conf->global->MAIN_SUBMODULE_EXPEDITION == 0)
{
print '<a href="confexped.php?action=activate_sending">'.img_picto($langs->trans("Disabled"),'off').'</a>';
print '<a href="confexped.php?action=activate_sending">'.$langs->trans("Activate").'</a>';
}
else if($conf->global->MAIN_SUBMODULE_EXPEDITION == 1)
{
print '<a href="confexped.php?action=disable_sending">'.img_picto($langs->trans("Enabled"),'on').'</a>';
print '<a href="confexped.php?action=disable_sending">'.$langs->trans("Disable").'</a>';
}
print "</td>";
@@ -144,16 +150,22 @@ print "<input type=\"hidden\" name=\"action\" value=\"delivery\">";
print "<tr ".$bc[$var].">";
print '<td>'.$langs->trans("DeliveriesOrderAbility").'</td>';
print '<td align="center" width="20">';
if($conf->global->MAIN_SUBMODULE_LIVRAISON == 1)
{
print img_tick();
}
print '</td>';
print '<td align="center" width="100">';
if($conf->global->MAIN_SUBMODULE_LIVRAISON == 0)
{
print '<a href="confexped.php?action=activate_delivery">'.img_picto($langs->trans("Disabled"),'off').'</a>';
print '<a href="confexped.php?action=activate_delivery">'.$langs->trans("Activate").'</a>';
}
else if($conf->global->MAIN_SUBMODULE_LIVRAISON == 1)
{
print '<a href="confexped.php?action=disable_delivery">'.img_picto($langs->trans("Enabled"),'on').'</a>';
print '<a href="confexped.php?action=disable_delivery">'.$langs->trans("Disable").'</a>';
}
print "</td>";

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
@@ -21,11 +21,11 @@
/**
* \file htdocs/admin/const.php
* \ingroup setup
* \brief Admin page to define miscellaneous constants
* \brief Admin page to defined miscellaneous constants
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
$langs->load("admin");
@@ -43,25 +43,9 @@ $typeconst=array('yesno','texte','chaine');
if ($_POST["action"] == 'add')
{
$error=0;
if (empty($_POST["constname"]))
if (dolibarr_set_const($db, $_POST["constname"],$_POST["constvalue"],$typeconst[$_POST["consttype"]],1,isset($_POST["constnote"])?$_POST["constnote"]:'',$_POST["entity"]) < 0)
{
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Name")).'</div>';
$error++;
}
if (empty($_POST["constvalue"]))
{
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Value")).'</div>';
$error++;
}
if (! $error)
{
if (dolibarr_set_const($db, $_POST["constname"],$_POST["constvalue"],$typeconst[$_POST["consttype"]],1,isset($_POST["constnote"])?$_POST["constnote"]:'',$_POST["entity"]) < 0)
{
dolibarr_print_error($db);
}
print $db->error();
}
}
@@ -73,7 +57,7 @@ if (($_POST["const"] && isset($_POST["update"]) && $_POST["update"] == $langs->t
{
if (dolibarr_set_const($db, $const["name"],$const["value"],$const["type"],1,$const["note"],$const["entity"]) < 0)
{
dolibarr_print_error($db);
print $db->error();
}
}
}
@@ -84,11 +68,11 @@ if ($_POST["const"] && $_POST["delete"] && $_POST["delete"] == $langs->trans("De
{
foreach($_POST["const"] as $const)
{
if ($const["check"]) // Is checkbox checked
if ($const["check"])
{
if (dolibarr_del_const($db, $const["rowid"], -1) < 0)
{
dolibarr_print_error($db);
print $db->error();
}
}
}
@@ -99,7 +83,7 @@ if ($_GET["action"] == 'delete')
{
if (dolibarr_del_const($db, $_GET["rowid"],$_GET["entity"]) < 0)
{
dolibarr_print_error($db);
print $db->error();
}
}
@@ -108,14 +92,13 @@ if ($_GET["action"] == 'delete')
* View
*/
llxHeader('',$langs->trans("OtherSetup"));
llxHeader();
print_fiche_titre($langs->trans("OtherSetup"),'','setup');
print $langs->trans("ConstDesc")."<br>\n";
print "<br>\n";
if ($mesg) print $mesg;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
@@ -162,7 +145,7 @@ print '</tr>';
print '</form>';
print "\n";
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<form action="'.DOL_URL_ROOT.'/admin/const.php" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
# Affiche lignes des constantes
@@ -224,7 +207,7 @@ if ($result)
}
print '<td align="center">';
if ($conf->use_javascript_ajax)
if ($conf->use_javascript_ajax)
{
print '<input type="checkbox" id="check_'.$i.'" name="const['.$i.'][check]" value="1" onClick="displayElement(\'delconst\');">';
print ' &nbsp; ';

View File

@@ -25,7 +25,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
$langs->load("admin");

View File

@@ -3,7 +3,6 @@
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -27,7 +26,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/html.formadmin.class.php");
require_once(DOL_DOCUMENT_ROOT."/html.formcompany.class.php");
@@ -105,7 +104,7 @@ $tabsql[6] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.t
$tabsql[7] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.deductible, p.code as pays_code, p.libelle as pays, a.fk_pays as pays_id, a.active FROM ".MAIN_DB_PREFIX."c_chargesociales AS a, ".MAIN_DB_PREFIX."c_pays as p WHERE a.fk_pays=p.rowid and p.active=1";
$tabsql[8] = "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_typent";
$tabsql[9] = "SELECT code, code_iso, label as libelle, active FROM ".MAIN_DB_PREFIX."c_currencies";
$tabsql[10]= "SELECT t.rowid, t.taux, t.localtax1, t.localtax2, p.libelle as pays, p.code as pays_code, t.fk_pays as pays_id, t.recuperableonly, t.note, t.active FROM ".MAIN_DB_PREFIX."c_tva as t, llx_c_pays as p WHERE t.fk_pays=p.rowid";
$tabsql[10]= "SELECT t.rowid, t.taux, p.libelle as pays, p.code as pays_code, t.fk_pays as pays_id, t.recuperableonly, t.note, t.active FROM ".MAIN_DB_PREFIX."c_tva as t, llx_c_pays as p WHERE t.fk_pays=p.rowid";
$tabsql[11]= "SELECT t.rowid as rowid, element, source, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_contact AS t";
$tabsql[12]= "SELECT c.rowid as rowid, code, sortorder, c.libelle, c.libelle_facture, nbjour, fdm, decalage, active FROM ".MAIN_DB_PREFIX."cond_reglement AS c";
$tabsql[13]= "SELECT id as rowid, code, c.libelle, type, active FROM ".MAIN_DB_PREFIX."c_paiement AS c";
@@ -126,7 +125,7 @@ $tabsqlsort[6] ="a.type ASC, a.code ASC";
$tabsqlsort[7] ="pays ASC, code ASC, a.libelle ASC";
$tabsqlsort[8] ="libelle ASC";
$tabsqlsort[9] ="code ASC";
$tabsqlsort[10]="pays ASC, taux ASC, recuperableonly ASC, localtax1 ASC, localtax2 ASC";
$tabsqlsort[10]="pays ASC, taux ASC, recuperableonly ASC";
$tabsqlsort[11]="element ASC, source ASC, code ASC";
$tabsqlsort[12]="sortorder ASC, code ASC";
$tabsqlsort[13]="code ASC";
@@ -147,7 +146,7 @@ $tabfield[6] = "code,libelle,type";
$tabfield[7] = "code,libelle,pays_id,pays,deductible";
$tabfield[8] = "code,libelle";
$tabfield[9] = "code,code_iso,libelle";
$tabfield[10]= "pays_id,pays,taux,recuperableonly,localtax1,localtax2,note";
$tabfield[10]= "pays_id,pays,taux,recuperableonly,note";
$tabfield[11]= "element,source,code,libelle";
$tabfield[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage";
$tabfield[13]= "code,libelle,type";
@@ -168,7 +167,7 @@ $tabfieldvalue[6] = "code,libelle,type";
$tabfieldvalue[7] = "code,libelle,pays,deductible";
$tabfieldvalue[8] = "code,libelle";
$tabfieldvalue[9] = "code,code_iso,libelle";
$tabfieldvalue[10]= "pays,taux,recuperableonly,localtax1,localtax2,note";
$tabfieldvalue[10]= "pays,taux,recuperableonly,note";
$tabfieldvalue[11]= "element,source,code,libelle";
$tabfieldvalue[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage";
$tabfieldvalue[13]= "code,libelle,type";
@@ -189,7 +188,7 @@ $tabfieldinsert[6] = "code,libelle,type";
$tabfieldinsert[7] = "code,libelle,fk_pays,deductible";
$tabfieldinsert[8] = "code,libelle";
$tabfieldinsert[9] = "code,code_iso,label";
$tabfieldinsert[10]= "fk_pays,taux,recuperableonly,localtax1,localtax2,note";
$tabfieldinsert[10]= "fk_pays,taux,recuperableonly,note";
$tabfieldinsert[11]= "element,source,code,libelle";
$tabfieldinsert[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage";
$tabfieldinsert[13]= "code,libelle,type";

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,9 +22,9 @@
* \brief Page d'administration/configuration du module Dons
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/compta/dons/don.class.php");
require_once(DOL_DOCUMENT_ROOT."/don.class.php");
$langs->load("admin");
$langs->load("donations");
@@ -122,7 +122,7 @@ if ($_GET["action"] == 'del')
/*
* View
* Affiche page
*/
$dir = "../includes/modules/dons/";
@@ -207,20 +207,20 @@ while (($file = readdir($handle))!==false)
print "<td align=\"center\">\n";
if ($conf->global->DON_ADDON_MODEL == $name)
{
print img_picto($langs->trans("Enabled"),'on');
print img_tick($langs->trans("Enabled"));
}
else
{
print '&nbsp;';
print '</td><td align="center">';
print '<a href="dons.php?action=setdoc&value='.$name.'">'.img_picto($langs->trans("Enabled"),'on').'</a>';
print '<a href="dons.php?action=setdoc&value='.$name.'">'.$langs->trans("Activate").'</a>';
}
print '</td>';
}
else
{
print "<td align=\"center\">\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'">'.$langs->trans("Activate").'</a>';
print "</td>";
}
@@ -228,11 +228,11 @@ while (($file = readdir($handle))!==false)
print "<td align=\"center\">";
if ($conf->global->DON_ADDON_MODEL == "$name")
{
print img_picto($langs->trans("Default"),'on');
print img_tick($langs->trans("Default"));
}
else
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;value='.$name.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;value='.$name.'" alt="'.$langs->trans("Default").'">'.$langs->trans("Default").'</a>';
}
print '</td>';

118
htdocs/admin/droitpret.php Normal file
View File

@@ -0,0 +1,118 @@
<?php
/* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
* Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
* \file htdocs/admin/droitpret.php
* \ingroup pret
* \brief Page d'administration/configuration du module DroitPret
* \version $Id$
*/
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/categories/categorie.class.php");
$langs->load("admin");
$langs->load("categories");
if (!$user->admin)
accessforbidden();
// positionne la variable pour le test d'affichage de l'icone
$var=True;
// Action mise a jour ou ajout d'une constante
if ($_POST["action"] == 'update' || $_POST["action"] == 'add')
{
if (! dolibarr_set_const($db, $_POST["constname"],$_POST["constvalue"],$_POST["consttype"],0,isset($_POST["constnote"])?$_POST["constnote"]:'',$conf->entity))
{
print $db->error();
}
else
{
Header("Location: droitpret.php");
exit;
}
}
llxHeader();
/*
* Interface de configuration de certaines variables de la partie adherent
*/
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print_fiche_titre($langs->trans("PretSetup"),$linkback,'setup');
print "<br>";
print_fiche_titre($langs->trans("MemberMainOptions"),'','');
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Description").'</td>';
print '<td>'.$langs->trans("Value").'</td>';
print '<td align="center">'.$langs->trans("Action").'</td>';
print "</tr>\n";
$var=true;
$form = new Form($db);
// Categorie
$var=!$var;
print '<form action="droitpret.php" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
print '<input type="hidden" name="constname" value="DROITPRET_CAT">';
print '<input type="hidden" name="consttype" value="chaine">';
print "<tr $bc[$var] class=value><td>".$langs->trans("catActive").'</td><td>';
print $form->select_all_categories(2,$conf->global->DROITPRET_CAT,"constvalue");
print '</td><td align="center" width="80">';
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
print "</td></tr>\n";
print '</form>';
// Adresse destination
$var=!$var;
print '<form action="droitpret.php" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
print '<input type="hidden" name="constname" value="DROITPRET_MAIL">';
print '<input type="hidden" name="consttype" value="chaine">';
print "<tr $bc[$var] class=value><td>".$langs->trans("mailDroitPret").'</td>';
print '<td><input type="text" name="constvalue" value="'.$conf->global->DROITPRET_MAIL.'"></td>';
print '<td align="center" width="80">';
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
print "</td></tr>\n";
print '</form>';
print '</table>';
print '<br>';
?>

119
htdocs/admin/editeur.php Normal file
View File

@@ -0,0 +1,119 @@
<?php
/* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
* \file htdocs/admin/editeur.php
* \ingroup editeur
* \brief Page d'administration/configuration du module Editeur
* \version $Id$
*/
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
$langs->load("admin");
if (!$user->admin)
accessforbidden();
// Action activation d'un sous module du module adherent
if ($_POST["action"] == 'set')
{
$name = "EDITEUR_LIVRE_FORMAT_".time();
$result=dolibarr_set_const($db, $name, $_POST["format"],'chaine',0,'',$conf->entity);
if ($result < 0)
{
print $db->error();
}
}
// Action desactivation d'un sous module
if ($_GET["action"] == 'unset')
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."const";
$sql.= " WHERE ".$db->decrypt('name');
$sql.= " LIKE 'EDITEUR_LIVRE_FORMAT_%'";
$sql.= " AND rowid='".$_GET["id"]."';";
if ($db->query($sql))
{
Header("Location: editeur.php");
exit;
}
}
/*
* View
*/
llxHeader();
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print_fiche_titre($langs->trans("Configuration du module Editeur"),$linkback,'setup');
print '<br>';
print '<form action="editeur.php" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="nobordernopadding" width="100%">';
print '<input type="hidden" name="action" value="set">';
print "<tr $bc[$var] class=value><td>".$langs->trans("NewFormat").'</td><td>';
print '<input type="texte" name="format">';
print '</td><td align="center" width="80">';
print '<input type="submit" class="button" value="'.$langs->trans("Add").'" name="Button">';
print "</td></tr>\n";
print '</table>';
print '</form>';
print '<br>';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Formats").'</td>';
print '<td align="center" width="80">'.$langs->trans("Action").'</td>';
print "</tr>\n";
$var=true;
$sql = "SELECT";
$sql.= " rowid";
$sql.= ", ".$db->decrypt('value')." as value";
$sql.= " FROM ".MAIN_DB_PREFIX."const";
$sql.= " WHERE ".$db->decrypt('name');
$sql.= " LIKE 'EDITEUR_LIVRE_FORMAT_%'";
$result = $db->query($sql);
while ($obj = $db->fetch_object($result) )
{
$var=!$var;
print "<tr $bc[$var]><td>".nl2br($obj->value)."</td>\n";
print '<td align="center">';
print '<a href="editeur.php?action=unset&id='.$obj->rowid.'">'.$langs->trans('Delete').'</a>';
print "</td></tr>\n";
}
print '</table>';
$db->close();
llxFooter('$Date$ - $Revision$');
?>

View File

@@ -19,14 +19,13 @@
* $Id$
*/
/**
* \file htdocs/admin/energie.php
* \ingroup energie
* \brief Page d'administration/configuration du module de gestion de l'energie
* \version $Revision$
*/
/** \file htdocs/admin/energie.php
\ingroup energie
\brief Page d'administration/configuration du module de gestion de l'energie
\version $Revision$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
$langs->load("admin");

View File

@@ -23,7 +23,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/agenda.lib.php");

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2003-2008 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
@@ -22,13 +22,13 @@
*/
/**
* \file htdocs/admin/expedition.php
* \ingroup expedition
* \brief Page d'administration/configuration du module Expedition
* \version $Id$
\file htdocs/admin/expedition.php
\ingroup expedition
\brief Page d'administration/configuration du module Expedition
\version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT.'/expedition/expedition.class.php');
@@ -97,7 +97,7 @@ if ($_GET["action"] == 'del')
$sql.= " WHERE nom = '".$_GET["value"]."'";
$sql.= " AND type = '".$type."'";
$sql.= " AND entity = ".$conf->entity;
if ($db->query($sql))
{
@@ -141,12 +141,12 @@ if ($_GET["action"] == 'setmethod' || $_GET["action"] == 'setmod')
require_once(DOL_DOCUMENT_ROOT."/includes/modules/expedition/methode_expedition_$module.modules.php");
$classname = "methode_expedition_$module";
$expem = new $classname($db);
$class = "methode_expedition_$module";
$expem = new $class($db);
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."expedition_methode";
$sql.= " WHERE rowid = ".$moduleid;
$resql = $db->query($sql);
if ($resql && ($statut == 1 || $_GET["action"] == 'setmod'))
{
@@ -155,7 +155,7 @@ if ($_GET["action"] == 'setmethod' || $_GET["action"] == 'setmod')
$sqlu = "UPDATE ".MAIN_DB_PREFIX."expedition_methode";
$sqlu.= " SET statut=1";
$sqlu.= " WHERE rowid=".$moduleid;
$result=$db->query($sqlu);
if ($result)
{
@@ -288,7 +288,7 @@ print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td width="140">'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Description").'</td>';
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
print '<td align="center" width="60">'.$langs->trans("Activated").'</td>';
print '<td align="center" width="60">'.$langs->trans("Default").'</td>';
print '<td align="center" width="32" colspan="2">'.$langs->trans("Infos").'</td>';
print "</tr>\n";
@@ -319,26 +319,26 @@ if(is_dir($dir))
print $module->description;
print '</td>';
// Active
// Activ
if (in_array($name, $def))
{
print "<td align=\"center\">\n";
if ($conf->global->EXPEDITION_ADDON_PDF != $name)
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'">';
print img_picto($langs->trans("Activated"),'on');
print img_tick($langs->trans("Disable"));
print '</a>';
}
else
{
print img_picto($langs->trans("Activated"),'on');
print img_tick($langs->trans("Activated"));
}
print "</td>";
}
else
{
print "<td align=\"center\">\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'">'.$langs->trans("Activate").'</a>';
print "</td>";
}
@@ -346,11 +346,11 @@ if(is_dir($dir))
print "<td align=\"center\">";
if ($conf->global->EXPEDITION_ADDON_PDF == $name)
{
print img_picto($langs->trans("Default"),'on');
print img_tick($langs->trans("Default"));
}
else
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;value='.$name.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;value='.$name.'" alt="'.$langs->trans("Default").'">'.$langs->trans("Default").'</a>';
}
print '</td>';
@@ -378,6 +378,10 @@ else
}
print '</table>';
/*
*
*
*/
$db->close();

View File

@@ -27,7 +27,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
include_once(MAGPIERSS_PATH."rss_fetch.inc");
@@ -40,7 +40,7 @@ $def = array();
$lastexternalrss=0;
// positionne la variable pour le nombre de rss externes
$sql ="select MAX(name) as name from ".MAIN_DB_PREFIX."const";
$sql ="select MAX(name) name from ".MAIN_DB_PREFIX."const";
$sql.=" WHERE name like 'EXTERNAL_RSS_URLRSS_%'";
$result=$db->query($sql);
if ($result)

View File

@@ -23,13 +23,13 @@
/**
* \file htdocs/admin/facture.php
* \ingroup facture
* \brief Page to setup invoice module
* \brief Page d'administration/configuration du module Facture
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT.'/compta/facture/facture.class.php');
require_once(DOL_DOCUMENT_ROOT.'/facture.class.php');
$langs->load("admin");
$langs->load("companies");
@@ -190,7 +190,7 @@ if ($_GET["action"] == 'delete')
/*
* View
* View page
*/
llxHeader("",$langs->trans("BillsSetup"),'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura');
@@ -223,7 +223,7 @@ print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Description").'</td>';
print '<td nowrap>'.$langs->trans("Example").'</td>';
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
print '<td align="center" width="60">'.$langs->trans("Default").'</td>';
print '<td align="center" width="16">'.$langs->trans("Infos").'</td>';
print '</tr>'."\n";
@@ -273,11 +273,11 @@ foreach ($conf->file->dol_document_root as $dirroot)
print '<td align="center">';
if ($conf->global->FACTURE_ADDON == "$file")
{
print img_picto($langs->trans("Activated"),'on');
print img_tick($langs->trans("Activated"));
}
else
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;value='.$file.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;value='.$file.'" alt="'.$langs->trans("Default").'">'.$langs->trans("Default").'</a>';
}
print '</td>';
@@ -367,7 +367,7 @@ print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Description").'</td>';
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
print '<td align="center" width="60">'.$langs->trans("Activated").'</td>';
print '<td align="center" width="60">'.$langs->trans("Default").'</td>';
print '<td align="center" width="32" colspan="2">'.$langs->trans("Infos").'</td>';
print "</tr>\n";
@@ -409,19 +409,19 @@ foreach ($conf->file->dol_document_root as $dirroot)
if ($conf->global->FACTURE_ADDON_PDF != "$name")
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'">';
print img_picto($langs->trans("Enabled"),'on');
print img_tick($langs->trans("Disable"));
print '</a>';
}
else
{
print img_picto($langs->trans("Enabled"),'on');
print img_tick($langs->trans("Enabled"));
}
print "</td>";
}
else
{
print "<td align=\"center\">\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'">'.$langs->trans("Activate").'</a>';
print "</td>";
}
@@ -429,11 +429,11 @@ foreach ($conf->file->dol_document_root as $dirroot)
print "<td align=\"center\">";
if ($conf->global->FACTURE_ADDON_PDF == "$name")
{
print img_picto($langs->trans("Default"),'on');
print img_tick($langs->trans("Default"));
}
else
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;value='.$name.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;value='.$name.'" alt="'.$langs->trans("Default").'">'.$langs->trans("Default").'</a>';
}
print '</td>';

View File

@@ -20,13 +20,13 @@
*/
/**
* \file htdocs/admin/fckeditor.php
* \ingroup fckeditor
* \brief Page d'activation du module FCKeditor dans les autres modules
* \version $Revision$
*/
\file htdocs/admin/fckeditor.php
\ingroup fckeditor
\brief Page d'activation du module FCKeditor dans les autres modules
\version $Revision$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
$langs->load("admin");

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
@@ -28,7 +28,7 @@
* \version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT.'/fichinter/fichinter.class.php');
@@ -190,7 +190,7 @@ print '<tr class="liste_titre">';
print '<td width="100">'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Description").'</td>';
print '<td>'.$langs->trans("Example").'</td>';
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
print '<td align="center" width="60">'.$langs->trans("Activated").'</td>';
print '<td align="center" width="16">'.$langs->trans("Infos").'</td>';
print "</tr>\n";
@@ -206,7 +206,7 @@ if ($handle)
if (preg_match('/^(mod_.*)\.php$/i',$file,$reg))
{
$file = $reg[1];
$classname = substr($file,4);
$className = substr($file,4);
require_once($dir.$file.".php");
@@ -227,13 +227,13 @@ if ($handle)
print '<td nowrap="nowrap">'.$module->getExample()."</td>\n";
print '<td align="center">';
if ($conf->global->FICHEINTER_ADDON == $classname)
if ($conf->global->FICHEINTER_ADDON == $className)
{
print img_picto($langs->trans("Activated"),'on');
print img_tick($langs->trans("Activated"));
}
else
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;value='.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;value='.$className.'" alt="'.$langs->trans("Default").'">'.$langs->trans("Default").'</a>';
}
print '</td>';
@@ -294,7 +294,7 @@ print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Description").'</td>';
print '<td align="center" width="60">'.$langs->trans("Status")."</td>\n";
print '<td align="center" width="60">'.$langs->trans("Activated")."</td>\n";
print '<td align="center" width="60">'.$langs->trans("Default")."</td>\n";
print '<td align="center" width="32" colspan="2">'.$langs->trans("Infos").'</td>';
print "</tr>\n";
@@ -328,19 +328,19 @@ while (($file = readdir($handle))!==false)
if ($conf->global->FICHEINTER_ADDON_PDF != "$name")
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'">';
print img_picto($langs->trans("Enabled"),'on');
print img_tick($langs->trans("Disable"));
print '</a>';
}
else
{
print img_picto($langs->trans("Enabled"),'on');
print img_tick($langs->trans("Enabled"));
}
print "</td>";
}
else
{
print "<td align=\"center\">\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'">'.$langs->trans("Activate").'</a>';
print "</td>";
}
@@ -348,11 +348,11 @@ while (($file = readdir($handle))!==false)
print "<td align=\"center\">";
if ($conf->global->FICHEINTER_ADDON_PDF == "$name")
{
print img_picto($langs->trans("Default"),'on');
print img_tick($langs->trans("Default"));
}
else
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;value='.$name.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;value='.$name.'" alt="'.$langs->trans("Default").'">'.$langs->trans("Default").'</a>';
}
print '</td>';

View File

@@ -21,13 +21,13 @@
*/
/**
* \file htdocs/admin/fournisseur.php
* \ingroup fournisseur
* \brief Page d'administration-configuration du module Fournisseur
* \version $Id$
\file htdocs/admin/fournisseur.php
\ingroup fournisseur
\brief Page d'administration-configuration du module Fournisseur
\version $Id$
*/
require("../main.inc.php");
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT.'/fourn/fournisseur.class.php');
require_once(DOL_DOCUMENT_ROOT.'/fourn/fournisseur.commande.class.php');
@@ -71,8 +71,8 @@ if ($_GET["action"] == 'specimen')
if ($obj->write_file($commande,$langs) > 0)
{
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=commande_fournisseur&file=SPECIMEN.pdf");
return;
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=commande_fournisseur&file=SPECIMEN.pdf");
return;
}
else
{
@@ -177,7 +177,7 @@ print '<tr class="liste_titre">';
print '<td width="100">'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Description").'</td>';
print '<td>'.$langs->trans("Example").'</td>';
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
print '<td align="center" width="60">'.$langs->trans("Activated").'</td>';
print '<td align="center" width="16">'.$langs->trans("Info").'</td>';
print "</tr>\n";
@@ -215,11 +215,11 @@ if ($handle)
print '<td align="center">';
if ($conf->global->COMMANDE_SUPPLIER_ADDON == "$file")
{
print img_picto($langs->trans("Activated"),'on');
print img_tick($langs->trans("Activated"));
}
else
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;value='.$file.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;value='.$file.'" alt="'.$langs->trans("Default").'">'.$langs->trans("Activate").'</a>';
}
print '</td>';
@@ -296,7 +296,7 @@ print "<table class=\"noborder\" width=\"100%\">\n";
print "<tr class=\"liste_titre\">\n";
print ' <td width="100">'.$langs->trans("Name")."</td>\n";
print " <td>".$langs->trans("Description")."</td>\n";
print '<td align="center" width="60">'.$langs->trans("Status")."</td>\n";
print '<td align="center" width="60">'.$langs->trans("Activated")."</td>\n";
print '<td align="center" width="60">'.$langs->trans("Default")."</td>\n";
print '<td align="center" width="32" colspan="2">'.$langs->trans("Info").'</td>';
print "</tr>\n";
@@ -324,35 +324,35 @@ while (($file = readdir($handle))!==false)
// Active
if (in_array($name, $def))
{
print "<td align=\"center\">\n";
if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF != "$name")
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'">';
print img_picto($langs->trans("Enabled"),'on');
print '</a>';
}
else
{
print img_picto($langs->trans("Enabled"),'on');
}
print "<td align=\"center\">\n";
if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF != "$name")
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'">';
print img_tick($langs->trans("Disable"));
print '</a>';
}
else
{
print img_tick($langs->trans("Enabled"));
}
print "</td>";
}
else
{
print "<td align=\"center\">\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'">'.$langs->trans("Activate").'</a>';
print "</td>";
print "<td align=\"center\">\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'">'.$langs->trans("Activate").'</a>';
print "</td>";
}
// Defaut
print "<td align=\"center\">";
if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF == "$name")
{
print img_picto($langs->trans("Default"),'on');
print img_tick($langs->trans("Default"));
}
else
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;value='.$name.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'on').'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;value='.$name.'" alt="'.$langs->trans("Default").'">'.$langs->trans("Default").'</a>';
}
print '</td>';

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