forked from Wavyzz/dolibarr
Compare commits
58 Commits
phpstan-ba
...
2.8.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a830971136 | ||
|
|
125bf602ce | ||
|
|
a40792d2bb | ||
|
|
c8526a2a18 | ||
|
|
5ff9286a1f | ||
|
|
9f65a33f04 | ||
|
|
59e43b289f | ||
|
|
8fb412be2b | ||
|
|
29ffc5b6b6 | ||
|
|
7f15052000 | ||
|
|
234a39adea | ||
|
|
1ec8213630 | ||
|
|
d081c30938 | ||
|
|
8f4f9c5de2 | ||
|
|
88fd8c701e | ||
|
|
9935122b67 | ||
|
|
bb28c51c1a | ||
|
|
cbf4aa2f2a | ||
|
|
293e56399e | ||
|
|
c7b125120e | ||
|
|
fb254a1dd4 | ||
|
|
1afa3ceb69 | ||
|
|
c15c5a1f83 | ||
|
|
36505d86c4 | ||
|
|
fce4e60c03 | ||
|
|
1a8f41f5e4 | ||
|
|
6feb1a06fa | ||
|
|
fb6fe2e2d6 | ||
|
|
cf067eebca | ||
|
|
0164bc4c69 | ||
|
|
4d88519e6d | ||
|
|
075117f8d6 | ||
|
|
c944e9aa65 | ||
|
|
441dabe6fa | ||
|
|
e9d97ccc40 | ||
|
|
a6c6efd5b0 | ||
|
|
8d4ea5c0af | ||
|
|
d09d1ab85c | ||
|
|
754dc90496 | ||
|
|
d4ab0697f9 | ||
|
|
3d380b46ac | ||
|
|
3d1e357089 | ||
|
|
df068798da | ||
|
|
f1107cdb4f | ||
|
|
b96a8bc796 | ||
|
|
4b5bcaa4c7 | ||
|
|
40abbaa622 | ||
|
|
40a43da1e0 | ||
|
|
beb8ed8260 | ||
|
|
c6a6ac8159 | ||
|
|
7f20dd7d69 | ||
|
|
7afa85fbae | ||
|
|
c62a61c6ba | ||
|
|
a5dcf433f6 | ||
|
|
a3bb3f2cee | ||
|
|
fad16cf338 | ||
|
|
605d43a2ec | ||
|
|
218858dc72 |
20
ChangeLog
20
ChangeLog
@@ -1,5 +1,23 @@
|
||||
English Dolibarr ChangeLog
|
||||
|
||||
***** ChangeLog for 2.8.2 compared to 2.8.1 *****
|
||||
For users:
|
||||
- Fix: Bad setup of phpMyAdmin for DoliWamp installer.
|
||||
- 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 *****
|
||||
For users:
|
||||
- Fix: Works on database with _ in name.
|
||||
- Fix: Broken feature in trips and expense module.
|
||||
- Fix: Can use $ in database and login/pass values.
|
||||
- Fix: No error on upgrade if there is orphelins tasks.
|
||||
- Fix: Failed to login when user agent string was longer than 128.
|
||||
- Fix: bug #29526 : Numérotation Proposition Incorrecte après duplication
|
||||
|
||||
|
||||
***** ChangeLog for 2.8 compared to 2.7 *****
|
||||
|
||||
@@ -41,6 +59,8 @@ For users:
|
||||
- Fix: Running sending-email.php
|
||||
- Fix: Warning should not appears for invoice closed
|
||||
- Fix: Import for companies works even with prefix empty.
|
||||
- Fix: bug #28895 : Création d'utilisateur impossible.
|
||||
- Fix: Can change password if has only permission change password.
|
||||
|
||||
For developers:
|
||||
- Qual: Reorganize /dev directory.
|
||||
|
||||
4
README
4
README
@@ -68,7 +68,7 @@ To upgrade Dolibarr from an old version to this one:
|
||||
http://yourdolibarrhost/something/install/
|
||||
|
||||
Then choose the "update" option according to your case.
|
||||
Note: Migrate process can ben runned safely several times.
|
||||
Note: Migrate process can be ran safely several times.
|
||||
|
||||
|
||||
III - WHAT'S NEW
|
||||
@@ -97,7 +97,7 @@ Main modules/features:
|
||||
- ECM (Electronic Content Management)
|
||||
- EMailings
|
||||
- Agenda with ical,vcal export for third tools integration
|
||||
- Management of fundation members
|
||||
- Management of foundation members
|
||||
- Donation management
|
||||
|
||||
Other modules:
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
; ----- Change this -----
|
||||
AppName=DoliWamp
|
||||
; DoliWamp-x.x.x or DoliWamp-x.x.x-dev or DoliWamp-x.x.x-beta
|
||||
AppVerName=DoliWamp-2.8.0-beta
|
||||
AppVerName=DoliWamp-2.8.1
|
||||
; DoliWamp-x.x x or DoliWamp-x.x.x-dev or DoliWamp-x.x.x-beta
|
||||
OutputBaseFilename=DoliWamp-2.8.0-beta
|
||||
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\dolibarr
|
||||
SourceDir=D:\Mes developpements\dolibarrold
|
||||
; ----- End of change
|
||||
AppId=doliwamp
|
||||
AppPublisher=NLTechno
|
||||
@@ -83,7 +83,7 @@ Source: "C:\Program Files (x86)\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}
|
||||
; 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
|
||||
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db,telephonie\*,*\conf.php,*\install.forced.php,*\modBookmark4u.class.php,*\modDocument.class.php,*\modDroitPret.class.php,*\modEditeur.class.php,*\modPostnuke.class.php,*\modTelephonie.class.php,*\interface_modEditeur_Editeur.class.php*,*\rodolphe"
|
||||
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db,telephonie\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\install.forced.php,*\modBookmark4u.class.php,*\modDocument.class.php,*\modDroitPret.class.php,*\modEditeur.class.php,*\modPostnuke.class.php,*\modTelephonie.class.php,*\interface_modEditeur_Editeur.class.php*,*\rodolphe"
|
||||
Source: "dev\*.*"; DestDir: "{app}\www\dolibarr\dev"; Flags: ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db,fpdf\*,initdemo\*,iso-normes\*,samples\*,test\*,uml\*,xdebug\*"
|
||||
Source: "doc\*.*"; DestDir: "{app}\www\dolibarr\doc"; Flags: ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db,wiki\*,plaquette\*,dev\*"
|
||||
Source: "scripts\*.*"; DestDir: "{app}\www\dolibarr\scripts"; Flags: ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db,product\materiel.net.php,product\import-product.php"
|
||||
@@ -135,6 +135,7 @@ var apachePort: String;
|
||||
var mysqlPort: String;
|
||||
var newPassword: String;
|
||||
|
||||
var lockFile: String;
|
||||
var srcFile: String;
|
||||
var destFile: String;
|
||||
var srcFileH: String;
|
||||
@@ -334,8 +335,12 @@ begin
|
||||
|
||||
|
||||
// Remove lock file
|
||||
DeleteFile(pathWithSlashes+'/www/dolibarr/install.lock');
|
||||
|
||||
lockfile := pathWithSlashes+'/www/dolibarr/install.lock';
|
||||
if FileExists (lockfile) and not DeleteFile(lockfile) then
|
||||
begin
|
||||
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
|
||||
|
||||
|
||||
// Check if parameters already defined in conf.php file
|
||||
@@ -546,6 +551,7 @@ begin
|
||||
// sinon on prends le fichier par defaut
|
||||
LoadStringFromFile (srcFile, srcContents);
|
||||
StringChange (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass);
|
||||
StringChange (srcContents, 'WAMPMYSQLPORT', myport);
|
||||
SaveStringToFile(destFile,srcContents, False);
|
||||
end
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@ REM Microsoft add bugs in service packs that prevents
|
||||
REM servers ran as a service to launch.
|
||||
REM -----------------------------------------------------
|
||||
|
||||
echo Running Apache
|
||||
WAMPROOT\bin\apache\apacheWAMPAPACHEVERSION\bin\httpd.exe -k start
|
||||
echo Running Apache as user process (this process does not return so we use "start")
|
||||
start WAMPROOT\bin\apache\apacheWAMPAPACHEVERSION\bin\httpd.exe -f conf\httpd.conf
|
||||
|
||||
echo
|
||||
|
||||
echo Running Mysql
|
||||
WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --defaults-file=WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\my.ini
|
||||
echo Running Mysql as user process (this process does not return so we use "start")
|
||||
start WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --defaults-file=WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\my.ini --console
|
||||
|
||||
pause
|
||||
@@ -11,7 +11,7 @@ use Cwd;
|
||||
$PROJECT="dolibarr";
|
||||
$MAJOR="2";
|
||||
$MINOR="8";
|
||||
$BUILD="0-beta"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate
|
||||
$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
|
||||
@@ -241,6 +241,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/documents`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/document`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf.php.mysql`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf.php.old`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf.php.postgres`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/CVS* $BUILDROOT/$PROJECT/*/CVS* $BUILDROOT/$PROJECT/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/*/CVS*`;
|
||||
@@ -260,7 +261,7 @@ if ($nboftargetok) {
|
||||
|
||||
print "Compress $BUILDROOT into $FILENAMESNAPSHOT.tgz...\n";
|
||||
#$cmd="tar --exclude \"$BUILDROOT/tgz/tar_exclude.txt\" --exclude .cache --exclude .settings --exclude conf.php --directory \"$BUILDROOT\" -czvf \"$FILENAMESNAPSHOT.tgz\" $FILENAMESNAPSHOT";
|
||||
$cmd="tar --exclude .cache --exclude .settings --exclude conf.php --directory \"$BUILDROOT\" -czvf \"$FILENAMESNAPSHOT.tgz\" $FILENAMESNAPSHOT";
|
||||
$cmd="tar --exclude .cache --exclude .settings --exclude conf.php --exclude conf.php.mysql --exclude conf.php.old --exclude conf.php.postgres --directory \"$BUILDROOT\" -czvf \"$FILENAMESNAPSHOT.tgz\" $FILENAMESNAPSHOT";
|
||||
print $cmd."\n";
|
||||
$ret=`$cmd`;
|
||||
if ($OS =~ /windows/i)
|
||||
@@ -385,6 +386,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/usr/share/$PROJECT/doc/tshirt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/usr/share/$PROJECT/doc/rollup`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/usr/share/$PROJECT/htdocs/conf/conf.php.mysql`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/usr/share/$PROJECT/htdocs/conf/conf.php.old`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/usr/share/$PROJECT/htdocs/conf/conf.php.postgres`;
|
||||
|
||||
print "Edit version in file $BUILDROOT/$PROJECT/DEBIAN/control\n";
|
||||
|
||||
@@ -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 & Finance</Program_Category_Class>
|
||||
|
||||
@@ -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 & Finance</Program_Category_Class>
|
||||
|
||||
Binary file not shown.
@@ -35,7 +35,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 />
|
||||
@@ -45,7 +45,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 & Finance</Program_Category_Class>
|
||||
|
||||
Binary file not shown.
@@ -35,7 +35,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 />
|
||||
@@ -45,7 +45,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 & Finance</Program_Category_Class>
|
||||
|
||||
@@ -25,6 +25,7 @@ document
|
||||
documents
|
||||
htdocs/conf/conf.php
|
||||
htdocs/conf/conf.php.mysql
|
||||
htdocs/conf/conf.php.old
|
||||
htdocs/conf/conf.php.postgres
|
||||
htdocs/avoir
|
||||
htdocs/document
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
*/documents/*
|
||||
*/htdocs/conf/conf.php
|
||||
*/htdocs/conf/conf.php.mysql
|
||||
*/htdocs/conf/conf.php.old
|
||||
*/htdocs/conf/conf.php.postgres
|
||||
*/htdocs/avoir/*
|
||||
*/htdocs/document/*
|
||||
|
||||
@@ -684,7 +684,7 @@ CREATE TABLE `llx_c_chargesociales` (
|
||||
|
||||
LOCK TABLES `llx_c_chargesociales` WRITE;
|
||||
/*!40000 ALTER TABLE `llx_c_chargesociales` DISABLE KEYS */;
|
||||
INSERT INTO `llx_c_chargesociales` VALUES (1,'Allocations familiales',1,1,'TAXFAM',1),(2,'GSG Deductible',1,1,'TAXCSGD',1),(3,'GSG/CRDS NON Deductible',0,1,'TAXCSGND',1),(10,'Taxe apprenttissage',0,1,'TAXAPP',1),(11,'Taxe professionnelle',0,1,'TAXPRO',1),(20,'Impots locaux/fonciers',0,1,'TAXFON',1),(25,'Impots revenus',0,1,'TAXREV',1),(30,'Assurance Sante',0,1,'TAXSECU',1),(40,'Mutuelle',0,1,'TAXMUT',1),(50,'Assurance vieillesse',0,1,'TAXRET',1),(60,'Assurance Chomage',0,1,'TAXCHOM',1);
|
||||
INSERT INTO `llx_c_chargesociales` VALUES (1,'Allocations familiales',1,1,'TAXFAM',1),(2,'CSG Deductible',1,1,'TAXCSGD',1),(3,'CSG/CRDS NON Deductible',0,1,'TAXCSGND',1),(10,'Taxe apprenttissage',0,1,'TAXAPP',1),(11,'Taxe professionnelle',0,1,'TAXPRO',1),(20,'Impots locaux/fonciers',0,1,'TAXFON',1),(25,'Impots revenus',0,1,'TAXREV',1),(30,'Assurance Sante',0,1,'TAXSECU',1),(40,'Mutuelle',0,1,'TAXMUT',1),(50,'Assurance vieillesse',0,1,'TAXRET',1),(60,'Assurance Chomage',0,1,'TAXCHOM',1);
|
||||
/*!40000 ALTER TABLE `llx_c_chargesociales` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
@@ -226,7 +226,7 @@ print '<td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Chemin du binaire genbarcode sous linux
|
||||
if (!isset($_ENV['windir']) && !file_exists($_ENV['windir']))
|
||||
if (! isset($_SERVER['WINDIR']))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
@@ -164,14 +164,14 @@ class Categorie
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Appel des triggers
|
||||
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
|
||||
$interface=new Interfaces($this->db);
|
||||
$result=$interface->run_triggers('CATEGORY_CREATE',$this,$user,$langs,$conf);
|
||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||
// Fin appel triggers
|
||||
|
||||
|
||||
return $id;
|
||||
}
|
||||
else
|
||||
@@ -244,14 +244,14 @@ class Categorie
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
$this->db->commit();
|
||||
|
||||
|
||||
// Appel des triggers
|
||||
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
|
||||
$interface=new Interfaces($this->db);
|
||||
$result=$interface->run_triggers('CATEGORY_UPDATE',$this,$user,$langs,$conf);
|
||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||
// Fin appel triggers
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
@@ -305,7 +305,7 @@ class Categorie
|
||||
$result=$interface->run_triggers('CATEGORY_DELETE',$this,$user,$langs,$conf);
|
||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||
// Fin appel triggers
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -444,8 +444,8 @@ class Categorie
|
||||
{
|
||||
while ($rec = $this->db->fetch_array ($res))
|
||||
{
|
||||
$obj = new $class ($this->db, $rec['fk_'.$field]);
|
||||
$obj->fetch ($obj->id);
|
||||
$obj = new $class ($this->db);
|
||||
$obj->fetch ($rec['fk_'.$field]);
|
||||
$objs[] = $obj;
|
||||
}
|
||||
return $objs;
|
||||
|
||||
@@ -121,7 +121,7 @@ class Commande extends CommonObject
|
||||
for ($i = 0 ; $i < sizeof($propal->lignes) ; $i++)
|
||||
{
|
||||
$line = new OrderLine($this->db);
|
||||
|
||||
|
||||
$line->libelle = $propal->lignes[$i]->libelle;
|
||||
$line->desc = $propal->lignes[$i]->desc;
|
||||
$line->price = $propal->lignes[$i]->price;
|
||||
@@ -133,7 +133,7 @@ class Commande extends CommonObject
|
||||
$line->fk_product = $propal->lignes[$i]->fk_product;
|
||||
$line->info_bits = $propal->lignes[$i]->info_bits;
|
||||
$line->product_type = $propal->lignes[$i]->product_type;
|
||||
|
||||
|
||||
$this->lines[$i] = $line;
|
||||
}
|
||||
|
||||
@@ -461,6 +461,8 @@ class Commande extends CommonObject
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$error=0;
|
||||
|
||||
if ($user->rights->commande->valider)
|
||||
{
|
||||
$this->db->begin();
|
||||
@@ -470,31 +472,36 @@ class Commande extends CommonObject
|
||||
$sql.= " WHERE rowid = ".$this->id;
|
||||
$sql.= " AND fk_statut = 1";
|
||||
|
||||
dol_syslog("Commande::cancel sql=".$sql, LOG_DEBUG);
|
||||
if ($this->db->query($sql) )
|
||||
{
|
||||
// If stock is decremented on validate order, we must reincrement it
|
||||
if($conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1)
|
||||
if ($conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1)
|
||||
{
|
||||
$mouvP = new MouvementStock($this->db);
|
||||
// We increment stock of product (and sub-products)
|
||||
$entrepot_id = "1"; //Todo: ajouter possibilite de choisir l'entrepot
|
||||
$result=$mouvP->reception($user, $this->lignes[$i]->fk_product, $entrepot_id, $this->lignes[$i]->qty, $this->lignes[$i]->subprice);
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/stock/mouvementstock.class.php");
|
||||
|
||||
if ($result > 0)
|
||||
if ($this->lignes[$i]->fk_product > 0 && $this->lignes[$i]->product_type == 0)
|
||||
{
|
||||
$this->db->commit();
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$mouvP->error;
|
||||
$this->db->rollback();
|
||||
return $result;
|
||||
$mouvP = new MouvementStock($this->db);
|
||||
// We increment stock of product (and sub-products)
|
||||
$entrepot_id = "1"; //Todo: ajouter possibilite de choisir l'entrepot
|
||||
$result=$mouvP->reception($user, $this->lignes[$i]->fk_product, $entrepot_id, $this->lignes[$i]->qty, $this->lignes[$i]->subprice);
|
||||
if ($result < 0) { $error++; }
|
||||
}
|
||||
}
|
||||
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
if (! $error)
|
||||
{
|
||||
$this->statut=-1;
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$mouvP->error;
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -882,7 +889,7 @@ class Commande extends CommonObject
|
||||
$price = $prod->price;
|
||||
|
||||
$line=new OrderLine($this->db);
|
||||
|
||||
|
||||
$line->fk_product=$idproduct;
|
||||
$line->desc=$prod->description;
|
||||
$line->qty=$qty;
|
||||
@@ -1067,7 +1074,7 @@ class Commande extends CommonObject
|
||||
}
|
||||
|
||||
$line = new OrderLine($this->db);
|
||||
|
||||
|
||||
$line->fk_commande=$this->id;
|
||||
$line->fk_remise_except=$remise->id;
|
||||
$line->desc=$remise->description; // Description ligne
|
||||
@@ -1147,7 +1154,7 @@ class Commande extends CommonObject
|
||||
$objp = $this->db->fetch_object($result);
|
||||
|
||||
$line = new OrderLine($this->db);
|
||||
|
||||
|
||||
$line->rowid = $objp->rowid; // \deprecated
|
||||
$line->id = $objp->rowid;
|
||||
$line->fk_commande = $objp->fk_commande;
|
||||
@@ -1354,10 +1361,10 @@ class Commande extends CommonObject
|
||||
|
||||
// Supprime ligne
|
||||
$line = new OrderLine($this->db);
|
||||
|
||||
|
||||
$line->id = $idligne;
|
||||
$line->fk_commande = $this->id; // On en a besoin dans les triggers
|
||||
|
||||
|
||||
$result=$line->delete($user);
|
||||
|
||||
if ($result > 0)
|
||||
@@ -1700,7 +1707,7 @@ class Commande extends CommonObject
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande SET';
|
||||
$sql.= ' ref_client = '.(empty($ref_client) ? 'NULL' : '\''.addslashes($ref_client).'\'');
|
||||
$sql.= ' WHERE rowid = '.$this->id;
|
||||
|
||||
|
||||
if ($this->db->query($sql) )
|
||||
{
|
||||
$this->ref_client = $ref_client;
|
||||
@@ -1866,29 +1873,35 @@ class Commande extends CommonObject
|
||||
*/
|
||||
function delete($user)
|
||||
{
|
||||
global $conf, $lang;
|
||||
global $conf, $langs;
|
||||
|
||||
$err = 0;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = 'DELETE FROM '.MAIN_DB_PREFIX."commandedet WHERE fk_commande = ".$this->id;
|
||||
dol_syslog("Commande::delete sql=".$sql);
|
||||
if (! $this->db->query($sql) )
|
||||
{
|
||||
dol_syslog("Commande::delete error", LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
|
||||
$sql = 'DELETE FROM '.MAIN_DB_PREFIX."commande WHERE rowid = ".$this->id;
|
||||
dol_syslog("Commande::delete sql=".$sql);
|
||||
if (! $this->db->query($sql) )
|
||||
{
|
||||
dol_syslog("Commande::delete error", LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."element_element";
|
||||
$sql.= " WHERE fk_target = ".$this->id;
|
||||
$sql.= " AND targettype = ".$this->element;
|
||||
$sql.= " AND targettype = '".$this->element."'";
|
||||
dol_syslog("Commande::delete sql=".$sql);
|
||||
if (! $this->db->query($sql) )
|
||||
{
|
||||
dol_syslog("Commande::delete error", LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
|
||||
@@ -2230,9 +2243,9 @@ class Commande extends CommonObject
|
||||
while ($xnbp < $nbp)
|
||||
{
|
||||
$line=new OrderLine($this->db);
|
||||
|
||||
|
||||
$prodid = rand(1, $num_prods);
|
||||
|
||||
|
||||
$line->desc=$langs->trans("Description")." ".$xnbp;
|
||||
$line->qty=1;
|
||||
$line->subprice=100;
|
||||
@@ -2243,10 +2256,10 @@ class Commande extends CommonObject
|
||||
$line->total_tva=19.6;
|
||||
$line->produit_id=$prodids[$prodid];
|
||||
$line->fk_product=$prodids[$prodid];
|
||||
|
||||
|
||||
$this->lignes[$xnbp]=$line; // TODO: deprecated
|
||||
$this->lines[$xnbp]=$line;
|
||||
|
||||
|
||||
$xnbp++;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,9 +97,16 @@ if ($_REQUEST['action'] == 'confirm_delete' && $_REQUEST['confirm'] == 'yes')
|
||||
{
|
||||
$commande = new Commande($db);
|
||||
$commande->fetch($_GET['id']);
|
||||
$commande->delete($user);
|
||||
Header('Location: index.php');
|
||||
exit;
|
||||
$result=$commande->delete($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
Header('Location: index.php');
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mesg=$commande->error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2064,7 +2071,7 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/expedition/commande.php?id='.$_GET['id'].'">'.$langs->trans('ShipProduct').'</a>';
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/expedition/shipment.php?id='.$_GET['id'].'">'.$langs->trans('ShipProduct').'</a>';
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -90,7 +90,7 @@ if ($year > 0)
|
||||
$sql .= "or (s.periode is null and date_format(s.date_ech, '%Y') = $year)";
|
||||
$sql .= ")";
|
||||
}
|
||||
$sql.= " GROUP BY c.id, c.libelle, s.rowid, s.fk_type, s.periode, s.date_ech";
|
||||
$sql.= " GROUP BY c.id, c.libelle, s.rowid, s.fk_type, s.periode, s.date_ech, pc.rowid, pc.datep, pc.amount";
|
||||
$sql.= " ORDER BY c.libelle ASC";
|
||||
|
||||
dol_syslog("compta/charges/index.php: select payment sql=".$sql);
|
||||
|
||||
@@ -101,8 +101,8 @@ class Deplacement extends CommonObject
|
||||
$sql.= ", ".$user->id;
|
||||
$sql.= ", ".$this->fk_user;
|
||||
$sql.= ", '".$this->type."'";
|
||||
$sql.= ", note = ".($this->note?"'".addslashes($this->note)."'":"null");
|
||||
$sql.= ", note_public = ".($this->note_public?"'".addslashes($this->note_public)."'":"null");
|
||||
$sql.= ", ".($this->note?"'".addslashes($this->note)."'":"null");
|
||||
$sql.= ", ".($this->note_public?"'".addslashes($this->note_public)."'":"null");
|
||||
$sql.= ")";
|
||||
|
||||
dol_syslog("Deplacement::create sql=".$sql, LOG_DEBUG);
|
||||
|
||||
@@ -66,7 +66,7 @@ if ($_POST["action"] == 'add_paiement')
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$paiement_id = 0;
|
||||
$paymentid = 0;
|
||||
|
||||
// Read possible payments
|
||||
$amounts = array();
|
||||
@@ -90,9 +90,9 @@ if ($_POST["action"] == 'add_paiement')
|
||||
$paiement->paiementtype = $_POST["paiementtype"];
|
||||
$paiement->num_paiement = $_POST["num_paiement"];
|
||||
$paiement->note = $_POST["note"];
|
||||
$paiement_id = $paiement->create($user);
|
||||
$paymentid = $paiement->create($user);
|
||||
|
||||
if ($paiement_id > 0)
|
||||
if ($paymentid > 0)
|
||||
{
|
||||
// On determine le montant total du paiement
|
||||
$total=0;
|
||||
@@ -136,7 +136,7 @@ if ($_POST["action"] == 'add_paiement')
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
$mesg = "Failed to create payment: paiement_id=$paiement_id ".$db->error();
|
||||
$mesg = "Failed to create payment: paiement_id=$paymentid ".$db->error();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,81 +13,81 @@
|
||||
# This parameter defines the root URL of your Dolibarr index.php page.
|
||||
# It must link to the directory htdocs.
|
||||
# Examples:
|
||||
# $dolibarr_main_url_root="http://localhost";
|
||||
# $dolibarr_main_url_root="http://mydolibarrvirtualhost";
|
||||
# $dolibarr_main_url_root="http://myserver/dolibarr/htdocs";
|
||||
# $dolibarr_main_url_root='http://localhost';
|
||||
# $dolibarr_main_url_root='http://mydolibarrvirtualhost';
|
||||
# $dolibarr_main_url_root='http://myserver/dolibarr/htdocs';
|
||||
#
|
||||
$dolibarr_main_url_root="";
|
||||
$dolibarr_main_url_root='';
|
||||
|
||||
|
||||
# dolibarr_main_document_root
|
||||
# This parameter contains absolute file system directory of Dolibarr
|
||||
# htdocs directory
|
||||
# Examples:
|
||||
# $dolibarr_main_document_root="/var/www/dolibarr/htdocs";
|
||||
# $dolibarr_main_document_root="C:/My web sites/dolibarr/htdocs";
|
||||
# $dolibarr_main_document_root='/var/www/dolibarr/htdocs';
|
||||
# $dolibarr_main_document_root='C:/My web sites/dolibarr/htdocs';
|
||||
#
|
||||
$dolibarr_main_document_root="";
|
||||
$dolibarr_main_document_root='';
|
||||
|
||||
|
||||
# dolibarr_main_data_root
|
||||
# This parameter contains absolute file system directory of Dolibarr
|
||||
# directory used to store uploaded and generated physical files.
|
||||
# Examples:
|
||||
# $dolibarr_main_document_root="/var/www/dolibarr/documents";
|
||||
# $dolibarr_main_document_root="E:/My web sites/dolibarr/documents";
|
||||
# $dolibarr_main_data_root='/var/www/dolibarr/documents';
|
||||
# $dolibarr_main_data_root='E:/My web sites/dolibarr/documents';
|
||||
#
|
||||
$dolibarr_main_data_root="";
|
||||
$dolibarr_main_data_root='';
|
||||
|
||||
|
||||
# dolibarr_main_db_host
|
||||
# This parameter contains host name or ip address of Dolibarr database
|
||||
# server.
|
||||
# Examples:
|
||||
# $dolibarr_main_db_host="localhost";
|
||||
# $dolibarr_main_db_host="127.0.0.1";
|
||||
# $dolibarr_main_db_host="192.168.0.10";
|
||||
# $dolibarr_main_db_host="mysql.myserver.com";
|
||||
# $dolibarr_main_db_host='localhost';
|
||||
# $dolibarr_main_db_host='127.0.0.1';
|
||||
# $dolibarr_main_db_host='192.168.0.10';
|
||||
# $dolibarr_main_db_host='mysql.myserver.com';
|
||||
#
|
||||
$dolibarr_main_db_host="";
|
||||
$dolibarr_main_db_host='';
|
||||
|
||||
|
||||
# dolibarr_main_db_port
|
||||
# This parameter contains the port of the Dolibarr database.
|
||||
# Default value: none
|
||||
# Examples:
|
||||
# $dolibarr_main_db_host="3306;
|
||||
# $dolibarr_main_db_host='3306';
|
||||
#
|
||||
$dolibarr_main_db_port="";
|
||||
$dolibarr_main_db_port='';
|
||||
|
||||
|
||||
# dolibarr_main_db_name
|
||||
# This parameter contains name of Dolibarr database.
|
||||
# Examples:
|
||||
# $dolibarr_main_db_name="dolibarr";
|
||||
# $dolibarr_main_db_name="mydatabase";
|
||||
# $dolibarr_main_db_name='dolibarr';
|
||||
# $dolibarr_main_db_name='mydatabase';
|
||||
#
|
||||
$dolibarr_main_db_name="";
|
||||
$dolibarr_main_db_name='';
|
||||
|
||||
|
||||
# dolibarr_main_db_user
|
||||
# This parameter contains user name used to read and write into
|
||||
# Dolibarr database.
|
||||
# Examples:
|
||||
# $dolibarr_main_db_user="admin";
|
||||
# $dolibarr_main_db_user="dolibarruser";
|
||||
# $dolibarr_main_db_user='admin';
|
||||
# $dolibarr_main_db_user='dolibarruser';
|
||||
#
|
||||
$dolibarr_main_db_user="";
|
||||
$dolibarr_main_db_user='';
|
||||
|
||||
|
||||
# dolibarr_main_db_pass
|
||||
# This parameter contains password used to read and write into
|
||||
# Dolibarr database.
|
||||
# Examples:
|
||||
# $dolibarr_main_db_pass="myadminpass";
|
||||
# $dolibarr_main_db_pass="myuserpassword";
|
||||
# $dolibarr_main_db_pass='myadminpass';
|
||||
# $dolibarr_main_db_pass='myuserpassword';
|
||||
#
|
||||
$dolibarr_main_db_pass="";
|
||||
$dolibarr_main_db_pass='';
|
||||
|
||||
|
||||
# dolibarr_main_db_type
|
||||
@@ -96,31 +96,37 @@ $dolibarr_main_db_pass="";
|
||||
# Default value: none
|
||||
# Possible values: mysql, mysqli, pgsql
|
||||
# Examples:
|
||||
# $dolibarr_main_db_type="mysql;
|
||||
# $dolibarr_main_db_type="mysqli";
|
||||
# $dolibarr_main_db_type="pgsql";
|
||||
# $dolibarr_main_db_type='mysql';
|
||||
# $dolibarr_main_db_type='mysqli';
|
||||
# $dolibarr_main_db_type='pgsql';
|
||||
#
|
||||
$dolibarr_main_db_type="";
|
||||
$dolibarr_main_db_type='';
|
||||
|
||||
|
||||
# dolibarr_main_db_character_set
|
||||
# Database character set used to store data (forced during database creation).
|
||||
# Default value: depends on database driver
|
||||
# Examples:
|
||||
# dolibarr_main_db_character_set="latin1";
|
||||
# dolibarr_main_db_character_set='latin1';
|
||||
#
|
||||
$dolibarr_main_db_character_set="latin1";
|
||||
$dolibarr_main_db_character_set='latin1';
|
||||
|
||||
|
||||
# dolibarr_main_db_collation
|
||||
# Database character set used to sort data (forced during database creation).
|
||||
# Default value: depends on database driver
|
||||
# Examples:
|
||||
# dolibarr_main_db_collation="latin1_swedish_ci";
|
||||
# dolibarr_main_db_collation='latin1_swedish_ci';
|
||||
#
|
||||
$dolibarr_main_db_collation="latin1_swedish_ci";
|
||||
$dolibarr_main_db_collation='latin1_swedish_ci';
|
||||
|
||||
|
||||
|
||||
|
||||
##################
|
||||
# Login #
|
||||
##################
|
||||
|
||||
# dolibarr_main_authentication
|
||||
# This parameter contains the way authentication is done.
|
||||
# If value "ldap" is used, you must also set parameters dolibarr_main_auth_ldap_*
|
||||
@@ -128,46 +134,57 @@ $dolibarr_main_db_collation="latin1_swedish_ci";
|
||||
# Possible values: Any values found in files in htdocs/includes/login directory after
|
||||
# the "function_" string and before the ".php" string.
|
||||
# Examples:
|
||||
# $dolibarr_main_authentication="http";
|
||||
# $dolibarr_main_authentication="dolibarr";
|
||||
# $dolibarr_main_authentication="ldap";
|
||||
# $dolibarr_main_authentication='http';
|
||||
# $dolibarr_main_authentication='dolibarr';
|
||||
# $dolibarr_main_authentication='ldap';
|
||||
#
|
||||
$dolibarr_main_authentication="dolibarr";
|
||||
|
||||
|
||||
# dolibarr_main_force_https
|
||||
# This parameter allows to force the HTTPS mode.
|
||||
# Warning: If you enable this parameter, your dolibarr_main_url_root parameter
|
||||
# must contains an URL with https and web server must be configured to respond
|
||||
# to such an URL.
|
||||
# Default value: 0
|
||||
# Possible values: 0 or 1
|
||||
# Examples:
|
||||
# $dolibarr_main_force_https=0;
|
||||
#
|
||||
$dolibarr_main_force_https="0";
|
||||
$dolibarr_main_authentication='dolibarr';
|
||||
|
||||
|
||||
# Parameters used to setup LDAP authentication.
|
||||
# Uncomment them if dolibarr_main_authentication = "ldap"
|
||||
# Uncomment them if dolibarr_main_authentication = 'ldap'
|
||||
#
|
||||
# $dolibarr_main_auth_ldap_host="127.0.0.1";
|
||||
# $dolibarr_main_auth_ldap_port="389";
|
||||
# $dolibarr_main_auth_ldap_version="3";
|
||||
# $dolibarr_main_auth_ldap_servertype="openldap"; # openldap, activedirectory or egroupware
|
||||
# $dolibarr_main_auth_ldap_login_attribute="loginfield"; # uid or samaccountname for active directory
|
||||
# $dolibarr_main_auth_ldap_dn=""; # Ex: ou=users,dc=my-domain,dc=com
|
||||
# $dolibarr_main_auth_ldap_admin_login=""; # Required only if anonymous bind disabled
|
||||
# $dolibarr_main_auth_ldap_admin_pass=""; # Required only if anonymous bind disabled
|
||||
# $dolibarr_main_auth_ldap_host='127.0.0.1';
|
||||
# $dolibarr_main_auth_ldap_port='389';
|
||||
# $dolibarr_main_auth_ldap_version='3';
|
||||
# $dolibarr_main_auth_ldap_servertype='openldap'; # openldap, activedirectory or egroupware
|
||||
# $dolibarr_main_auth_ldap_login_attribute='loginfield'; # uid or samaccountname for active directory
|
||||
# $dolibarr_main_auth_ldap_dn=''; # Ex: ou=users,dc=my-domain,dc=com
|
||||
# $dolibarr_main_auth_ldap_admin_login=''; # Required only if anonymous bind disabled
|
||||
# $dolibarr_main_auth_ldap_admin_pass=''; # Required only if anonymous bind disabled
|
||||
#
|
||||
# $dolibarr_main_auth_ldap_debug="false";
|
||||
# $dolibarr_main_auth_ldap_debug='false';
|
||||
|
||||
|
||||
# Login and pass to use in a demo mode
|
||||
# Default value: 0
|
||||
# Possible values: 0 or 1
|
||||
# Examples:
|
||||
# $dolibarr_main_demo="autologin,autopass"
|
||||
# $dolibarr_main_demo='autologin,autopass'
|
||||
|
||||
|
||||
|
||||
##################
|
||||
# Security #
|
||||
##################
|
||||
|
||||
|
||||
# dolibarr_main_force_https
|
||||
# This parameter allows to force the HTTPS mode.
|
||||
# Warning: If you enable this parameter, your web server must be configured
|
||||
# to respond URL with https protocol.
|
||||
# Default value: 0
|
||||
# Possible values: 0 or 1
|
||||
# Examples:
|
||||
# $dolibarr_main_force_https='0';
|
||||
#
|
||||
$dolibarr_main_force_https='0';
|
||||
|
||||
|
||||
|
||||
##################
|
||||
# Other #
|
||||
##################
|
||||
|
||||
|
||||
# When this parameter is defined, all errors messages are not reported.
|
||||
@@ -175,6 +192,6 @@ $dolibarr_main_force_https="0";
|
||||
# Default value: 0
|
||||
# Possible values: 0 or 1
|
||||
# Examples:
|
||||
# $dolibarr_main_prod=1
|
||||
# $dolibarr_main_prod='1';
|
||||
|
||||
?>
|
||||
|
||||
@@ -95,7 +95,7 @@ class Events // extends CommonObject
|
||||
$sql.= " '".$this->type."',";
|
||||
$sql.= " ".$conf->entity.",";
|
||||
$sql.= " '".$_SERVER['REMOTE_ADDR']."',";
|
||||
$sql.= " ".($_SERVER['HTTP_USER_AGENT']?"'".$_SERVER['HTTP_USER_AGENT']."'":'NULL').",";
|
||||
$sql.= " ".($_SERVER['HTTP_USER_AGENT']?"'".dol_trunc($_SERVER['HTTP_USER_AGENT'],120)."'":'NULL').",";
|
||||
$sql.= " ".$this->db->idate($this->dateevent).",";
|
||||
$sql.= " ".($user->id?"'".$user->id."'":'NULL').",";
|
||||
$sql.= " '".addslashes($this->description)."'";
|
||||
|
||||
@@ -37,7 +37,7 @@ $result = restrictedArea($user, 'expedition',$expeditionid,'');
|
||||
|
||||
$sortfield=isset($_GET["sortfield"])?$_GET["sortfield"]:"";
|
||||
$sortorder=isset($_GET["sortorder"])?$_GET["sortorder"]:"";
|
||||
if (! $sortfield) $sortfield="e.rowid";
|
||||
if (! $sortfield) $sortfield="e.ref";
|
||||
if (! $sortorder) $sortorder="DESC";
|
||||
|
||||
$limit = $conf->liste_limit;
|
||||
@@ -53,24 +53,17 @@ llxHeader('',$langs->trans('ListOfSendings'),$helpurl);
|
||||
|
||||
$sql = "SELECT e.rowid, e.ref,".$db->pdate("e.date_expedition")." as date_expedition, e.fk_statut";
|
||||
$sql.= ", s.nom as socname, s.rowid as socid";
|
||||
$sql.= ", ori.ref as origin_ref, ori.rowid as origin_id";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."expedition as e";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target";
|
||||
if ($conf->commande->enabled)
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."expedition as e";
|
||||
if (!$user->rights->societe->client->voir && !$socid) // Internal user with no permission to see all
|
||||
{
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."commande as ori ON el.fk_source = ori.rowid";
|
||||
$sql.= " AND el.sourcetype = 'commande'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."propal as ori ON el.fk_source = ori.rowid";
|
||||
$sql.= " AND el.sourcetype = 'propal'";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
}
|
||||
$sql.= ")";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc";
|
||||
$sql.= " WHERE e.entity = ".$conf->entity;
|
||||
if (!$user->rights->societe->client->voir && !$socid)
|
||||
if (!$user->rights->societe->client->voir && !$socid) // Internal user with no permission to see all
|
||||
{
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc";
|
||||
$sql.= " AND e.fk_soc = sc.fk_soc";
|
||||
$sql.= " AND sc.fk_user = " .$user->id;
|
||||
}
|
||||
if ($socid)
|
||||
@@ -100,15 +93,7 @@ if ($resql)
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),"liste.php","e.ref","","&socid=$socid",'width="15%"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Company"),"liste.php","s.nom", "", "&socid=$socid",'width="25%" align="left"',$sortfield,$sortorder);
|
||||
if ($conf->commande->enabled)
|
||||
{
|
||||
print_liste_field_titre($langs->trans("Order"),"liste.php","ori.ref", "", "&socid=$socid",'width="25%" align="left"',$sortfield,$sortorder);
|
||||
}
|
||||
else
|
||||
{
|
||||
print_liste_field_titre($langs->trans("Proposal"),"liste.php","ori.ref", "", "&socid=$socid",'width="25%" align="left"',$sortfield,$sortorder);
|
||||
}
|
||||
print_liste_field_titre($langs->trans("Date"),"liste.php","e.date_expedition","","&socid=$socid", 'width="25%" align="right" colspan="2"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Date"),"liste.php","e.date_expedition","","&socid=$socid", 'width="25%" align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),"liste.php","e.fk_statut","","&socid=$socid",'width="10%" align="right"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
@@ -122,27 +107,6 @@ if ($resql)
|
||||
print "<td><a href=\"fiche.php?id=".$objp->rowid."\">".img_object($langs->trans("ShowSending"),"sending").'</a> ';
|
||||
print "<a href=\"fiche.php?id=".$objp->rowid."\">".$objp->ref."</a></td>\n";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$objp->socid.'">'.$objp->socname.'</a></td>';
|
||||
if ($conf->commande->enabled)
|
||||
{
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/expedition/commande.php?id='.$objp->origin_id.'">'.$objp->origin_ref.'</a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/expedition/propal.php?propalid='.$objp->origin_id.'">'.$objp->origin_ref.'</a></td>';
|
||||
}
|
||||
|
||||
$now = time();
|
||||
$lim = 3600 * 24 * 15 ;
|
||||
|
||||
if ( ($now - $objp->date_expedition) > $lim && $objp->statutid == 1 )
|
||||
{
|
||||
print "<td><b> > 15 jours</b></td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td> </td>";
|
||||
}
|
||||
|
||||
print "<td align=\"right\">";
|
||||
$y = dol_print_date($objp->date_expedition,"%Y");
|
||||
$m = dol_print_date($objp->date_expedition,"%m");
|
||||
@@ -150,7 +114,7 @@ if ($resql)
|
||||
$d = dol_print_date($objp->date_expedition,"%d");
|
||||
print $d."\n";
|
||||
print " <a href=\"propal.php?year=$y&month=$m\">";
|
||||
print $b."</a>\n";
|
||||
print $m."</a>\n";
|
||||
print " <a href=\"propal.php?year=$y\">";
|
||||
print $y."</a></TD>\n";
|
||||
|
||||
@@ -171,5 +135,4 @@ else
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
|
||||
?>
|
||||
|
||||
@@ -375,6 +375,8 @@ class Fichinter extends CommonObject
|
||||
*/
|
||||
function verifyNumRef($soc)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT rowid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."fichinter";
|
||||
$sql.= " WHERE ref = '".$this->ref."'";
|
||||
|
||||
@@ -548,12 +548,12 @@ else
|
||||
print '<tr><td valign="top">'.$langs->trans('Label').'</td><td>';
|
||||
print '<input size="30" name="libelle" type="text" value="'.$fac->libelle.'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('DateInvoice').'</td><td nowrap="nowrap">';
|
||||
$html->select_date($fac->datep,'','','','',"update");
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('DateInvoice').'</td><td nowrap="nowrap">';
|
||||
$html->select_date($fac->datep,'','','','',"update",1,1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('DateEcheance').'</td><td nowrap="nowrap">';
|
||||
$html->select_date($fac->date_echeance,'ech','','','',"update");
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('DateEcheance').'</td><td nowrap="nowrap">';
|
||||
$html->select_date($fac->date_echeance,'ech','','','',"update",1,1);
|
||||
if (($fac->paye == 0) && ($fac->statut > 0) && $fac->date_echeance < ($now - $conf->facture->fournisseur->warning_delay)) print img_picto($langs->trans("Late"),"warning");
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -570,44 +570,6 @@ else
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
|
||||
/*
|
||||
* Lines of invoice
|
||||
*/
|
||||
print '<br>';
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans('Label').'</td>';
|
||||
print '<td align="right">'.$langs->trans('VAT').'</td>';
|
||||
print '<td align="right">'.$langs->trans('PriceUHT').'</td>';
|
||||
print '<td align="right">'.$langs->trans('PriceUTTC').'</td>';
|
||||
print '<td align="right">'.$langs->trans('Qty').'</td>';
|
||||
print '<td align="right">'.$langs->trans('TotalHT').'</td>';
|
||||
print '<td align="right">'.$langs->trans('TotalTTC').'</td>';
|
||||
print '<td colspan="2"> </td></tr>';
|
||||
for ($i = 0 ; $i < sizeof($fac->lignes) ; $i++)
|
||||
{
|
||||
$var=!$var;
|
||||
|
||||
// Affichage simple de la ligne
|
||||
print '<tr '.$bc[$var].'><td>'.$fac->lignes[$i]->description.'</td>';
|
||||
print '<td align="right">'.vatrate($fac->lignes[$i]->tva_tx).'%</td>';
|
||||
print '<td align="right" nowrap="nowrap">'.price($fac->lignes[$i]->pu_ht,'MU').'</td>';
|
||||
print '<td align="right" nowrap="nowrap">'.($fac->lignes[$i]->pu_ttc?price($fac->lignes[$i]->pu_ttc,'MU'):' ').'</td>';
|
||||
print '<td align="right">'.$fac->lignes[$i]->qty.'</td>';
|
||||
print '<td align="right" nowrap="nowrap">'.price($fac->lignes[$i]->total_ht,'MT').'</td>';
|
||||
print '<td align="right" nowrap="nowrap">'.price($fac->lignes[$i]->total_ttc,'MT').'</td>';
|
||||
print '<td align="center" width="16">';
|
||||
print '<a href="fiche.php?facid='.$fac->id.'&action=mod_ligne&etat=0&ligne_id='.$fac->lignes[$i]->rowid.'">'.img_edit().'</a>';
|
||||
print '</td>';
|
||||
print '<td align="center" width="16">';
|
||||
print '<a href="fiche.php?facid='.$fac->id.'&action=confirm_delete_line&ligne_id='.$fac->lignes[$i]->rowid.'">'.img_delete().'</a>';
|
||||
print '</td>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -700,9 +662,7 @@ else
|
||||
print '</tr>';
|
||||
|
||||
// Third party
|
||||
print '<tr><td>'.$langs->trans('Supplier').'</td><td colspan="4">'.$societe->getNomUrl(1);
|
||||
print ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/fiche.php?socid='.$fac->socid.'">'.$langs->trans('OtherBills').'</a>)</td>';
|
||||
print '</tr>';
|
||||
print '<tr><td>'.$langs->trans('Supplier').'</td><td colspan="4">'.$societe->getNomUrl(1).' (<a href="index.php?socid='.$fac->socid.'">'.$langs->trans('OtherBills').'</a>)</td></tr>';
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans('Type').'</td><td colspan="4">';
|
||||
@@ -756,7 +716,7 @@ else
|
||||
if ($conf->projet->enabled) $nbrows++;
|
||||
|
||||
print '<td rowspan="'.$nbrows.'" valign="top">';
|
||||
$sql = 'SELECT datep as dp, pf.amount,';
|
||||
$sql = 'SELECT '.$db->pdate('datep').' as dp, pf.amount,';
|
||||
$sql .= ' c.libelle as paiement_type, p.num_paiement, p.rowid';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn as p';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as c ON p.fk_paiement = c.id';
|
||||
@@ -786,7 +746,7 @@ else
|
||||
$objp = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td nowrap><a href="'.DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans('ShowPayment'),'payment').' '.dol_print_date($db->jdate($objp->dp),'day')."</a></td>\n";
|
||||
print '<td nowrap><a href="'.DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans('Payment'),'payment').'</a> '.dol_print_date($objp->dp,'day')."</td>\n";
|
||||
print '<td>'.$objp->paiement_type.' '.$objp->num_paiement.'</td>';
|
||||
print '<td align="right">'.price($objp->amount).'</td><td> '.$langs->trans('Currency'.$conf->monnaie).'</td>';
|
||||
|
||||
|
||||
@@ -366,7 +366,7 @@ function PLineSelect(&$inc, $parent, $lines, $level=0, $selected=0)
|
||||
print $langs->trans("Project").' '.$lines[$i]->projectref;
|
||||
if (empty($lines[$i]->public))
|
||||
{
|
||||
print ' ('.$langs->trans("Private").')';
|
||||
print ' ('.$langs->trans("PrivateProject").')';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -389,7 +389,7 @@ function PLineSelect(&$inc, $parent, $lines, $level=0, $selected=0)
|
||||
print $langs->trans("Project").' '.$lines[$i]->projectref;
|
||||
if (empty($lines[$i]->public))
|
||||
{
|
||||
print ' ('.$langs->trans("Private").')';
|
||||
print ' ('.$langs->trans("PrivateProject").')';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -93,7 +93,7 @@ class modPhpbarcode extends ModeleBarCode
|
||||
*/
|
||||
function buildBarCode($code,$encoding,$readable='Y')
|
||||
{
|
||||
global $_GET,$_ENV,$_SERVER;
|
||||
global $_GET,$_SERVER;
|
||||
global $conf;
|
||||
global $genbarcode_loc, $bar_color, $bg_color, $text_color, $font_loc;
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$pdf->MultiCell(0, 4, '', 0, 'J'); // Set interline to 4
|
||||
|
||||
// Pagehead
|
||||
|
||||
|
||||
//Affiche le filigrane brouillon - Print Draft Watermark
|
||||
if($fichinter->statut==0 && (! empty($conf->global->FICHINTER_DRAFT_WATERMARK)) )
|
||||
{
|
||||
@@ -246,7 +246,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
|
||||
$pdf->SetTextColor(0,0,100);
|
||||
$pdf->SetFont('Arial','B',14);
|
||||
$pdf->Text(11, 94, $outputlangs->trans("InterventionCard")." : ".$outputlangs->convToOutputCharset($fichinter->ref));
|
||||
$pdf->Text(11, 94, $outputlangs->transnoentities("InterventionCard")." : ".$outputlangs->convToOutputCharset($fichinter->ref));
|
||||
|
||||
$pdf->SetFillColor(220,220,220);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
@@ -257,7 +257,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$tab_top_newpage = 50;
|
||||
$tab_height = 110;
|
||||
$tab_height_newpage = 150;
|
||||
|
||||
|
||||
// Affiche notes
|
||||
if (! empty($fichinter->note_public))
|
||||
{
|
||||
@@ -280,7 +280,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
{
|
||||
$height_note=0;
|
||||
}
|
||||
|
||||
|
||||
$pdf->SetXY (10, $tab_top);
|
||||
$pdf->MultiCell(190,8,$outputlangs->transnoentities("Description"),0,'L',0);
|
||||
$pdf->line(10, $tab_top + 8, 200, $tab_top + 8 );
|
||||
@@ -300,25 +300,25 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
|
||||
//dol_syslog("desc=".dol_htmlentitiesbr($fichinter->description));
|
||||
$nblignes = sizeof($fichinter->lignes);
|
||||
|
||||
|
||||
$curY = $pdf->GetY();
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
|
||||
// Loop on each lines
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
{
|
||||
$fichinterligne = $fichinter->lignes[$i];
|
||||
|
||||
|
||||
$valide = $fichinterligne->id ? $fichinterligne->fetch($fichinterligne->id) : 0;
|
||||
if ($valide>0)
|
||||
{
|
||||
$curY = $nexY+3;
|
||||
|
||||
|
||||
$pdf->SetXY (10, $curY);
|
||||
$pdf->writeHTMLCell(0, 3, $this->marge_gauche, $curY,
|
||||
dol_htmlentitiesbr($outputlangs->transnoentities("Date")." : ".dol_print_date($fichinterligne->datei,'dayhour',false,$outputlangs,true)." - ".$outputlangs->transnoentities("Duration")." : ".ConvertSecondToTime($fichinterligne->duration),1,$outputlangs->charset_output), 0, 1, 0);
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
|
||||
$pdf->SetXY (10, $curY + 3);
|
||||
$desc = dol_htmlentitiesbr($fichinterligne->desc,1);
|
||||
$pdf->writeHTMLCell(0, 3, $this->marge_gauche, $curY + 3, $desc, 0, 1, 0);
|
||||
|
||||
@@ -98,21 +98,21 @@ class modProjet extends DolibarrModules
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 41; // id de la permission
|
||||
$this->rights[$r][1] = "Lire les projets et taches (publiques ou m'appartenant)"; // libelle de la permission
|
||||
$this->rights[$r][1] = "Lire les projets et taches (partagés ou dont je suis contact)"; // libelle de la permission
|
||||
$this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour)
|
||||
$this->rights[$r][3] = 1; // La permission est-elle une permission par defaut
|
||||
$this->rights[$r][4] = 'lire';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 42; // id de la permission
|
||||
$this->rights[$r][1] = "Creer/modifier les projets et taches (publiques ou m'appartenant)"; // libelle de la permission
|
||||
$this->rights[$r][1] = "Creer/modifier les projets et taches (partagés ou dont je suis contact)"; // libelle de la permission
|
||||
$this->rights[$r][2] = 'w'; // type de la permission (deprecie a ce jour)
|
||||
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
||||
$this->rights[$r][4] = 'creer';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 44; // id de la permission
|
||||
$this->rights[$r][1] = "Supprimer les projets et taches (publiques ou m'appartenant)"; // libelle de la permission
|
||||
$this->rights[$r][1] = "Supprimer les projets et taches (partagés ou dont je suis contact)"; // libelle de la permission
|
||||
$this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour)
|
||||
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
||||
$this->rights[$r][4] = 'supprimer';
|
||||
|
||||
@@ -66,7 +66,7 @@ class modUser extends DolibarrModules
|
||||
$this->dirs = array("/users/temp");
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array("/admin/user.php");
|
||||
$this->config_page_url = array("user.php");
|
||||
|
||||
// Dependancies
|
||||
$this->depends = array();
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
define('DONOTLOADCONF',1); // To avoid loading conf by file inc..php
|
||||
define('DONOTLOADCONF',1); // To avoid loading conf by file inc.php
|
||||
|
||||
include("./inc.php");
|
||||
$setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:'auto');
|
||||
@@ -201,6 +201,9 @@ if ($_POST["action"] == "set")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Force https
|
||||
$_POST["main_force_https"] = ((isset($_POST["main_force_https"]) && $_POST["main_force_https"] == "on")?'1':'0');
|
||||
|
||||
// Write conf file on disk
|
||||
if (! $error)
|
||||
@@ -520,48 +523,44 @@ function write_conf_file($conffile)
|
||||
fputs($fp,"# and explanations for all possibles parameters.\n");
|
||||
fputs($fp,"#\n");
|
||||
|
||||
fputs($fp, '$dolibarr_main_url_root="'.$_POST["main_url"].'";');
|
||||
fputs($fp, '$dolibarr_main_url_root=\''.addslashes($_POST["main_url"]).'\';');
|
||||
fputs($fp,"\n");
|
||||
|
||||
fputs($fp, '$dolibarr_main_document_root="'.$main_dir.'";');
|
||||
fputs($fp, '$dolibarr_main_document_root=\''.addslashes($main_dir).'\';');
|
||||
fputs($fp,"\n");
|
||||
|
||||
fputs($fp, '$dolibarr_main_data_root="'.$main_data_dir.'";');
|
||||
fputs($fp, '$dolibarr_main_data_root=\''.addslashes($main_data_dir).'\';');
|
||||
fputs($fp,"\n");
|
||||
|
||||
fputs($fp, '$dolibarr_main_db_host="'.$_POST["db_host"].'";');
|
||||
fputs($fp, '$dolibarr_main_db_host=\''.addslashes($_POST["db_host"]).'\';');
|
||||
fputs($fp,"\n");
|
||||
|
||||
fputs($fp, '$dolibarr_main_db_port="'.$_POST["db_port"].'";');
|
||||
fputs($fp, '$dolibarr_main_db_port=\''.addslashes($_POST["db_port"]).'\';');
|
||||
fputs($fp,"\n");
|
||||
|
||||
fputs($fp, '$dolibarr_main_db_name="'.$_POST["db_name"].'";');
|
||||
fputs($fp, '$dolibarr_main_db_name=\''.addslashes($_POST["db_name"]).'\';');
|
||||
fputs($fp,"\n");
|
||||
|
||||
fputs($fp, '$dolibarr_main_db_user="'.$_POST["db_user"].'";');
|
||||
fputs($fp, '$dolibarr_main_db_user=\''.addslashes($_POST["db_user"]).'\';');
|
||||
fputs($fp,"\n");
|
||||
|
||||
fputs($fp, '$dolibarr_main_db_pass="'.$_POST["db_pass"].'";');
|
||||
fputs($fp, '$dolibarr_main_db_pass=\''.addslashes($_POST["db_pass"]).'\';');
|
||||
fputs($fp,"\n");
|
||||
|
||||
fputs($fp, '$dolibarr_main_db_type="'.$_POST["db_type"].'";');
|
||||
fputs($fp, '$dolibarr_main_db_type=\''.addslashes($_POST["db_type"]).'\';');
|
||||
fputs($fp,"\n");
|
||||
|
||||
fputs($fp, '$dolibarr_main_db_character_set="'.$_POST["dolibarr_main_db_character_set"].'";');
|
||||
fputs($fp, '$dolibarr_main_db_character_set=\''.addslashes($_POST["dolibarr_main_db_character_set"]).'\';');
|
||||
fputs($fp,"\n");
|
||||
|
||||
fputs($fp, '$dolibarr_main_db_collation="'.$_POST["dolibarr_main_db_collation"].'";');
|
||||
fputs($fp, '$dolibarr_main_db_collation=\''.addslashes($_POST["dolibarr_main_db_collation"]).'\';');
|
||||
fputs($fp,"\n");
|
||||
|
||||
/* Authentication */
|
||||
if ($_POST["db_type"] == 'mssql')
|
||||
{
|
||||
fputs($fp, '$dolibarr_main_authentication="dolibarr_mdb2";');
|
||||
}
|
||||
else
|
||||
{
|
||||
fputs($fp, '$dolibarr_main_authentication="dolibarr";');
|
||||
}
|
||||
fputs($fp, '$dolibarr_main_authentication=\'dolibarr\';');
|
||||
fputs($fp,"\n");
|
||||
|
||||
fputs($fp, '$dolibarr_main_force_https=\''.$_POST["main_force_https"].'\';');
|
||||
fputs($fp,"\n");
|
||||
|
||||
fputs($fp, '?>');
|
||||
|
||||
@@ -38,7 +38,7 @@ $ok = 0;
|
||||
$err=error_reporting();
|
||||
error_reporting(0); // Disable all errors
|
||||
//error_reporting(E_ALL);
|
||||
@set_time_limit(240);
|
||||
@set_time_limit(300); // Need more than 240 on Windows 7/64
|
||||
error_reporting($err);
|
||||
|
||||
$setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:'auto');
|
||||
|
||||
@@ -114,8 +114,10 @@ if(! isset($dolibarr_main_url_root) || strlen($dolibarr_main_url_root) == 0)
|
||||
print $langs->trans("WithNoSlashAtTheEnd")."<br>";
|
||||
print $langs->trans("Examples").":<br>";
|
||||
?>
|
||||
<ul>
|
||||
<li>/var/www/dolibarr/htdocs</li>
|
||||
<li>C:/wwwroot/dolibarr/htdocs</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -145,8 +147,10 @@ print $langs->trans("WithNoSlashAtTheEnd")."<br>";
|
||||
print $langs->trans("DirectoryRecommendation")."<br>";
|
||||
print $langs->trans("Examples").":<br>";
|
||||
?>
|
||||
<ul>
|
||||
<li>/var/dolibarr_documents</li>
|
||||
<li>C:/My Documents/dolibarr/</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -187,8 +191,19 @@ print $dolibarr_main_url_root;
|
||||
<?php
|
||||
print $langs->trans("Examples").":<br>";
|
||||
?>
|
||||
<ul>
|
||||
<li>http://localhost/</li>
|
||||
<li>http://www.myserver.com:8180/dolibarr</li>
|
||||
</ul>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" class="label">
|
||||
<?php echo $langs->trans("ForceHttps"); ?>
|
||||
<td class="label" valign="top"><input type="checkbox" name="main_force_https"<?php if ($force_install_mainforcehttps) print ' checked="on"'; ?>></td>
|
||||
<td class="comment">
|
||||
<?php echo $langs->trans("CheckToForceHttps"); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Dolibarr database -->
|
||||
@@ -387,7 +402,7 @@ while (($file = readdir($handle))!==false)
|
||||
<script type="text/javascript" language="javascript">
|
||||
|
||||
function checkDatabaseName(databasename) {
|
||||
if (databasename.match(/[-;_\.]/)) { return false; }
|
||||
if (databasename.match(/[-;\.]/)) { return false; }
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
define('DOL_VERSION','2.8.0-beta'); // Also defined in htdocs/master.inc.php
|
||||
define('DOL_VERSION','2.8.1'); // Also defined in htdocs/master.inc.php
|
||||
|
||||
require_once('../translate.class.php');
|
||||
require_once('../lib/functions.lib.php');
|
||||
@@ -139,7 +139,7 @@ if (preg_match('/install.lock/i',$_SERVER["SCRIPT_FILENAME"]))
|
||||
}
|
||||
if (file_exists('../../install.lock'))
|
||||
{
|
||||
print 'Install pages have been disabled for security reason (by lock file install.lock).<br>';
|
||||
print 'Install pages have been disabled for security reason (by lock file install.lock in dolibarr root directory. Remove it manually if following link loops to this page).<br>';
|
||||
print '<a href="'.$dolibarr_main_url_root .'/admin/index.php?mainmenu=home&leftmenu=setup'.(isset($_POST["login"])?'&username='.urlencode($_POST["login"]):'').'">';
|
||||
print 'Click here to go to Dolibarr';
|
||||
print '</a>';
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
--
|
||||
|
||||
--
|
||||
-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors
|
||||
-- de l'install et tous les sigles '--' sont supprimés.
|
||||
-- Ne pas placer de commentaire en fin de ligne, ce fichier est parse lors
|
||||
-- de l'install et tous les sigles '--' sont supprimes.
|
||||
--
|
||||
|
||||
--
|
||||
@@ -33,8 +33,8 @@
|
||||
--
|
||||
|
||||
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 1, 'Allocations familiales', 1,1,'TAXFAM' ,'1');
|
||||
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 2, 'GSG Deductible', 1,1,'TAXCSGD' ,'1');
|
||||
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 3, 'GSG/CRDS NON Deductible',0,1,'TAXCSGND' ,'1');
|
||||
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 2, 'CSG Deductible', 1,1,'TAXCSGD' ,'1');
|
||||
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 3, 'CSG/CRDS NON Deductible',0,1,'TAXCSGND' ,'1');
|
||||
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (10, 'Taxe apprenttissage', 0,1,'TAXAPP' ,'1');
|
||||
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (11, 'Taxe professionnelle', 0,1,'TAXPRO' ,'1');
|
||||
insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (20, 'Impots locaux/fonciers', 0,1,'TAXFON' ,'1');
|
||||
|
||||
@@ -73,8 +73,8 @@ update llx_bank set dateo = datec where datev = '1970-01-01 00:00:00' and rappro
|
||||
|
||||
alter table llx_c_chargesociales add column actioncompta varchar(12) NOT NULL;
|
||||
insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values ( 1, 'Allocations familiales', 1,1,'TAXFAM');
|
||||
insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values ( 2, 'GSG Deductible', 1,1,'TAXCSGD');
|
||||
insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values ( 3, 'GSG/CRDS NON Deductible',0,1,'TAXCSGND');
|
||||
insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values ( 2, 'CSG Deductible', 1,1,'TAXCSGD');
|
||||
insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values ( 3, 'CSG/CRDS NON Deductible',0,1,'TAXCSGND');
|
||||
insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (10, 'Taxe apprenttissage', 0,1,'TAXAPP');
|
||||
insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (11, 'Taxe professionnelle', 0,1,'TAXPRO');
|
||||
insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (20, 'Impots locaux/fonciers', 0,1,'TAXFON');
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
--
|
||||
-- Be carefull to requests order.
|
||||
-- This file must be loaded by calling /install/index.php page
|
||||
-- when current version is 2.8.0 or higher.
|
||||
-- when current version is 2.7.0 or higher.
|
||||
--
|
||||
|
||||
ALTER TABLE llx_actioncomm CHANGE fk_projet fk_project integer;
|
||||
@@ -141,6 +141,9 @@ ALTER TABLE llx_projet_task DROP INDEX statut;
|
||||
ALTER TABLE llx_projet_task ADD INDEX idx_projet_task_fk_projet (fk_projet);
|
||||
ALTER TABLE llx_projet_task ADD INDEX idx_projet_task_fk_user_creat (fk_user_creat);
|
||||
ALTER TABLE llx_projet_task ADD INDEX idx_projet_task_fk_user_valid (fk_user_valid);
|
||||
-- V4.1 DELETE FROM llx_projet_task WHERE fk_projet NOT IN (SELECT rowid from llx_projet);
|
||||
-- V4.1 UPDATE llx_projet_task set fk_user_creat=NULL WHERE fk_user_creat IS NOT NULL AND fk_user_creat NOT IN (SELECT rowid from llx_user);
|
||||
-- V4.1 UPDATE llx_projet_task set fk_user_valid=NULL WHERE fk_user_valid IS NOT NULL AND fk_user_valid NOT IN (SELECT rowid from llx_user);
|
||||
ALTER TABLE llx_projet_task ADD CONSTRAINT fk_projet_task_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid);
|
||||
ALTER TABLE llx_projet_task ADD CONSTRAINT fk_projet_task_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user (rowid);
|
||||
ALTER TABLE llx_projet_task ADD CONSTRAINT fk_projet_task_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid);
|
||||
@@ -209,6 +212,7 @@ create table llx_entity
|
||||
INSERT INTO llx_entity (rowid, label, description, datec, fk_user_creat, visible, active) VALUES (1, 'Default Entity', 'This is the default entity', NOW(), 1, 1, 1);
|
||||
|
||||
-- Add constraint
|
||||
-- V4.1 DELETE FROM llx_fichinterdet WHERE fk_fichinter NOT IN (SELECT rowid from llx_fichinter);
|
||||
ALTER TABLE llx_fichinterdet ADD INDEX idx_fichinterdet_fk_fichinter (fk_fichinter);
|
||||
ALTER TABLE llx_fichinterdet ADD CONSTRAINT fk_fichinterdet_fk_fichinter FOREIGN KEY (fk_fichinter) REFERENCES llx_fichinter (rowid);
|
||||
|
||||
|
||||
@@ -395,9 +395,9 @@ Permission31=Read products
|
||||
Permission32=Create/modify products
|
||||
Permission34=Delete products
|
||||
Permission38=Export products
|
||||
Permission41=Read projects
|
||||
Permission42=Create/modify projects
|
||||
Permission44=Delete projects
|
||||
Permission41=Read projects (shared projects or projects i'm contact for)
|
||||
Permission42=Create/modify projects (shared projects or projects i'm contact for)
|
||||
Permission44=Delete projects (shared projects or projects i'm contact for)
|
||||
Permission61=Read interventions
|
||||
Permission62=Create/modify interventions
|
||||
Permission64=Delete interventions
|
||||
|
||||
@@ -38,6 +38,8 @@ ConfigurationFile=Configuration file
|
||||
WebPagesDirectory=Directory where web pages are stored
|
||||
DocumentsDirectory=Directory to store uploaded and generated documents
|
||||
URLRoot=URL Root
|
||||
ForceHttps=Force secure connections (https)
|
||||
CheckToForceHttps=Check this option to force secure connections (https).<br>This requires that the web server is configured with an SSL certificate.
|
||||
DolibarrDatabase=Dolibarr Database
|
||||
DatabaseChoice=Database choice
|
||||
DatabaseType=Database type
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
CHARSET=UTF-8
|
||||
Project=Project
|
||||
Projects=Projects
|
||||
SharedProject=Shared project
|
||||
SharedProject=Everybody
|
||||
PrivateProject=Contacts of project
|
||||
Myprojects=My projects
|
||||
ProjectsArea=Projects area
|
||||
NewProject=New project
|
||||
|
||||
@@ -395,9 +395,9 @@ Permission31 = Consulter les produits
|
||||
Permission32 = Créer/modifier les produits
|
||||
Permission34 = Supprimer les produits
|
||||
Permission38 = Exporter les produits
|
||||
Permission41 = Consulter les projets et tâches (publiques ou m'appartenant)
|
||||
Permission42 = Créer/modifier les projets et tâches (publiques ou m'appartenant)
|
||||
Permission44 = Supprimer les projets et tâches (publiques ou m'appartenant)
|
||||
Permission41 = Consulter les projets et tâches (partagés ou dont je suis contact)
|
||||
Permission42 = Créer/modifier les projets et tâches (partagés ou dont je suis contact)
|
||||
Permission44 = Supprimer les projets et tâches (partagés ou dont je suis contact)
|
||||
Permission61 = Consulter les interventions
|
||||
Permission62 = Créer/modifier les interventions
|
||||
Permission64 = Supprimer les interventions
|
||||
|
||||
@@ -14,12 +14,12 @@ PHPSupportPOSTGETOk=Ce PHP supporte bien les variables POST et GET.
|
||||
PHPSupportPOSTGETKo=Il est possible que ce PHP ne supporte pas les variables POST et/ou GET. Vérifier le paramètre <b>variables_order</b> du php.ini.
|
||||
PHPSupportGD=Ce PHP supporte les fonctions graphiques GD.
|
||||
PHPSupportUTF8=Ce PHP supporte les fonctions UTF8.
|
||||
PHPMemoryOK=Votre mémoire maximum de session PHP est défini à <b>%s</b>. Ceci devrait être suffisant.
|
||||
PHPMemoryTooLow=Votre mémoire maximum de session PHP est défini à <b>%s</b> octets. Ceci est trop faible. Il est recommandé de modifier le paramètre <b>memory_limit</b> de votre fichier <b>php.ini</b> à au moins <b>%s</b> octets.
|
||||
PHPMemoryOK=Votre mémoire maximum de session PHP est définie à <b>%s</b>. Ceci devrait être suffisant.
|
||||
PHPMemoryTooLow=Votre mémoire maximum de session PHP est définie à <b>%s</b> octets. Ceci est trop faible. Il est recommandé de modifier le paramètre <b>memory_limit</b> de votre fichier <b>php.ini</b> à au moins <b>%s</b> octets.
|
||||
Recheck=Cliquez ici pour un test plus probant
|
||||
ErrorPHPDoesNotSupportSessions=Votre installation PHP ne supporte pas les sessions. Cette fonctionnalité est requise pour faire fonctionner Dolibarr. Vérifiez votre configuration de PHP.
|
||||
ErrorPHPDoesNotSupportGD=Ce PHP ne supporte pas les fonctions graphiques GD. Aucun graphique ne sera disponible.
|
||||
ErrorPHPDoesNotSupportUTF8=Ce PHP ne supporte pas les fonctions UTF8. Résolver le problème avant d'install Dolibarr car il ne pourra pas fonctionner correctement.
|
||||
ErrorPHPDoesNotSupportUTF8=Ce PHP ne supporte pas les fonctions UTF8. Résolvez le problème avant d'installer Dolibarr car il ne pourra pas fonctionner correctement.
|
||||
ErrorDirDoesNotExists=Le répertoire <b>%s</b> n'existe pas ou n'est pas accessible.
|
||||
ErrorGoBackAndCorrectParameters=Revenez en arrière et corrigez les paramètres invalides.
|
||||
ErrorWrongValueForParameter=Vous avez peut-être saisi une mauvaise valeur pour le paramètre '%s'.
|
||||
@@ -27,9 +27,9 @@ ErrorFailedToCreateDatabase=Echec de création de la base '%s'.
|
||||
ErrorFailedToConnectToDatabase=Echec de connexion à la base '%s'.
|
||||
ErrorPHPVersionTooLow=Version de PHP trop ancienne. La version %s est requise.
|
||||
ErrorConnectedButDatabaseNotFound=Connection au serveur réussi mais base '%s' introuvable.
|
||||
ErrorDatabaseAlreadyExists=La base de donnée '%s' existe déjà.
|
||||
IfDatabaseNotExistsGoBackAndUncheckCreate=Si la base n'existe pas, revenez en arrière et cochez l'option "Créer la base de donnée".
|
||||
IfDatabaseExistsGoBackAndCheckCreate=Si la base existe déjà, revenez en arrière et désactiver l'option "Créer la base de donnée".
|
||||
ErrorDatabaseAlreadyExists=La base de données '%s' existe déjà.
|
||||
IfDatabaseNotExistsGoBackAndUncheckCreate=Si la base n'existe pas, revenez en arrière et cochez l'option "Créer la base de données".
|
||||
IfDatabaseExistsGoBackAndCheckCreate=Si la base existe déjà, revenez en arrière et désactiver l'option "Créer la base de données".
|
||||
PHPVersion=Version PHP
|
||||
YouCanContinue=Vous pouvez continuer...
|
||||
PleaseBePatient=Merci de patienter...
|
||||
@@ -38,6 +38,8 @@ ConfigurationFile=Fichier de configuration
|
||||
WebPagesDirectory=Répertoire contenant les pages web
|
||||
DocumentsDirectory=Répertoire devant contenir les documents générés (PDF, etc.)
|
||||
URLRoot=URL Racine
|
||||
ForceHttps=Forcer les connexions sécurisées (https)
|
||||
CheckToForceHttps=Cochez cette option pour forcer les connexions sécurisées (https).<br>Ceci nécessite que le serveur web soit configuré avec un certificat SSL.
|
||||
DolibarrDatabase=Base de données Dolibarr
|
||||
DatabaseChoice=Choix de la base de données
|
||||
DatabaseType=Type de la base de données
|
||||
@@ -52,13 +54,13 @@ AdminLogin=Login du propriétaire de la base de données Dolibarr.
|
||||
Password=Mot de passe
|
||||
PasswordAgain=Vérification du mot de passe
|
||||
AdminPassword=Mot de passe du propriétaire de la base de données Dolibarr.
|
||||
CreateDatabase=Créer la base de donnée
|
||||
CreateDatabase=Créer la base de données
|
||||
CreateUser=Créer le propriétaire
|
||||
DatabaseSuperUserAccess=Serveur de base de données - Accès super utilisateur
|
||||
CheckToCreateDatabase=Cochez cette option si la base de données n'existe pas et doit être créée.<br>Dans ce cas, il faut renseigner le login/mot de passe du superutilisateur au bas de cette page.
|
||||
CheckToCreateUser=Cochez cette option si l'utilisateur propriétaire n'existe pas et doit être créé.<br>Dans ce cas, il faut renseigner le nom et mot de passe du propriétaire à créer ainsi que le login/mot de passe du superutilisateur au bas de cette page. Si la case n'est pas cochée, le nom et mot de passe du propriétaire doivent exister.
|
||||
Experimental=(expérimental)
|
||||
DatabaseRootLoginDescription=Login de l'utilisateur de la base ayant les droits de création de bases de données ou de comptes pour la base, inutile si la base et son compte d'accès existe déjà (comme lorsque vous êtes chez un hébergeur).
|
||||
DatabaseRootLoginDescription=Login de l'utilisateur de la base ayant les droits de création de bases de données ou de comptes pour la base, inutile si la base et son compte d'accès existent déjà (comme lorsque vous êtes chez un hébergeur).
|
||||
KeepEmptyIfNoPassword=Laissez vide si l'administrateur n'a pas de mot de passe
|
||||
SaveConfigurationFile=Enregistrement du fichier de configuration
|
||||
ConfigurationSaving=Enregistrement du fichier de configuration
|
||||
@@ -94,7 +96,7 @@ DolibarrAdminLogin=Login de l'utilisateur administrateur de Dolibarr
|
||||
FailedToCreateAdminLogin=Echec de la création du compte administrateur Dolibarr.
|
||||
AdminLoginAlreadyExists=Compte administrateur Dolibarr '<b>%s</b>' déjà existant.
|
||||
WarningRemoveInstallDir=Attention, pour des raisons de sécurité, une fois l'installation terminée, il est conseillé de supprimer manuellement le répertoire <b>install</b>, ou d'y placer un fichier nommé <b>install.lock</b> en lecture seule.
|
||||
ThisPHPDoesNotSupportTypeBase=Le système PHP ne supporta pas les interfaces d'accès pour les bases %s
|
||||
ThisPHPDoesNotSupportTypeBase=Le système PHP ne supporte pas les interfaces d'accès pour les bases %s
|
||||
FunctionNotAvailableInThisPHP=Non disponible sur ce PHP
|
||||
MigrateScript=Script de migration
|
||||
ChoosedMigrateScript=Choix du script de migration
|
||||
@@ -117,26 +119,26 @@ ServerVersion=Version du serveur de base de données
|
||||
YouMustCreateItAndAllowServerToWrite=Vous devez créer ce dossier et permettre au serveur web d'écrire dans celui-ci.
|
||||
CharsetChoice=Choix du codage des caractères
|
||||
CharacterSetClient=Codage utilisé pour l'affichage des pages
|
||||
CharacterSetClientComment=Veuillez choisir le codage que vous souhaitez pour l'affichage des pages.<br/> Le codage proposé par défaut est celui de votre base de donnée par défaut.
|
||||
CharacterSetClientComment=Veuillez choisir le codage que vous souhaitez pour l'affichage des pages.<br/> Le codage proposé par défaut est celui de votre base de données par défaut.
|
||||
CollationConnection=Ordre de tri utilisé pour la base de données
|
||||
CollationConnectionComment=Veuillez choisir la page de code définissant l'ordre de tri des caractères utilisé par la base de donnée. Ce paramètre est aussi appelé 'collation' par certaines bases de données.<br/> Ce paramètre n'est pas sélectionnable si votre base est déjà créée.
|
||||
CollationConnectionComment=Veuillez choisir la page de code définissant l'ordre de tri des caractères utilisés par la base de données. Ce paramètre est aussi appelé 'collation' par certaines bases de données.<br/> Ce paramètre n'est pas sélectionnable si votre base est déjà créée.
|
||||
CharacterSetDatabase=Codage utilisé pour la base de données
|
||||
CharacterSetDatabaseComment=Veuillez choisir le codage que vous désirez choisir pour la création de la base de données.<br/> Ce paramètre n'est pas sélectionnable si votre base est déjà créée.
|
||||
YouAskDatabaseCreationSoDolibarrNeedToConnect=Vous avez demandé la création de la base de donnée <b>%s</b>, mais pour cela, Dolibarr doit se connecter sur le serveur <b>%s</b> via le super utilisateur <b>%s</b>.
|
||||
YouAskLoginCreationSoDolibarrNeedToConnect=Vous avez demandé la création du login de base de donnée <b>%s</b>, mais pour cela, Dolibarr doit se connecter sur le serveur <b>%s</b> via le super utilisateur <b>%s</b>.
|
||||
BecauseConnectionFailedParametersMayBeWrong=La connexion ayant échoué, les paramètres du serveur ou du super utilisateur sont peut-etre incorrects.
|
||||
OrphelinsPaymentsDetectedByMethod=Paiement orphelins detectés par la méthode %s
|
||||
RemoveItManuallyAndPressF5ToContinue=Supprimer le manuellement et appuyez sur F5 pour continuer.
|
||||
YouAskDatabaseCreationSoDolibarrNeedToConnect=Vous avez demandé la création de la base de données <b>%s</b>, mais pour cela, Dolibarr doit se connecter sur le serveur <b>%s</b> via le super utilisateur <b>%s</b>.
|
||||
YouAskLoginCreationSoDolibarrNeedToConnect=Vous avez demandé la création du login de base de données <b>%s</b>, mais pour cela, Dolibarr doit se connecter sur le serveur <b>%s</b> via le super utilisateur <b>%s</b>.
|
||||
BecauseConnectionFailedParametersMayBeWrong=La connexion ayant échoué, les paramètres du serveur ou du super utilisateur sont peut-être incorrects.
|
||||
OrphelinsPaymentsDetectedByMethod=Paiement orphelins détectés par la méthode %s
|
||||
RemoveItManuallyAndPressF5ToContinue=Supprimez le manuellement et appuyez sur F5 pour continuer.
|
||||
KeepDefaultValuesWamp=Comme vous utilisez l'assistant d'installation Dolibarr depuis DoliWamp, les valeurs proposées aux paramètres sont déjà optimisées. Ne les modifier qu'en connaissance de cause.
|
||||
KeepDefaultValuesDeb=Comme vous utilisez l'assistant d'installation Dolibarr depuis un package Ubuntu ou Debian, les valeurs proposées aux paramètres sont déjà optimisées. Seul le mot de passe du propriétaire de la base de données à créer est à renseigner. Ne modifier les autres informations qu'en connaissance de cause.
|
||||
KeepDefaultValuesMamp=Comme vous utilisez l'assistant d'installation Dolibarr depuis DoliMamp, les valeurs proposées aux paramètres sont déjà optimisées. Ne les modifier qu'en connaissance de cause.
|
||||
KeepDefaultValuesDeb=Comme vous utilisez l'assistant d'installation Dolibarr depuis un package Ubuntu ou Debian, les valeurs proposées aux paramètres sont déjà optimisées. Seul le mot de passe du propriétaire de la base de données à créer est à renseigner. Ne modifiez les autres informations qu'en connaissance de cause.
|
||||
KeepDefaultValuesMamp=Comme vous utilisez l'assistant d'installation Dolibarr depuis DoliMamp, les valeurs proposées aux paramètres sont déjà optimisées. Ne les modifiez qu'en connaissance de cause.
|
||||
FieldRenamed=Champ renommé
|
||||
IfLoginDoesNotExistsCheckCreateUser=Si le login n'existe pas encore, vous devez cocher l'option "Créer l'utilisateur"
|
||||
ErrorConnection=Le serveur "<b>%s</b>", nom de base "<b>%s</b>", login "<b>%s</b>", ou mot de passe de la base de donnée est peut-être incorrect ou la version du client PHP trop ancienne par rapport à la version de la base de donnée.
|
||||
ErrorConnection=Le serveur "<b>%s</b>", nom de base "<b>%s</b>", login "<b>%s</b>", ou mot de passe de la base de données est peut-être incorrect ou la version du client PHP trop ancienne par rapport à la version de la base de données.
|
||||
InstallChoiceRecommanded=Choix recommandé pour installer la version <b>%s</b> depuis votre version actuelle <b>%s</b>
|
||||
InstallChoiceSuggested=<b>Choix suggéré par l'installeur</b>.
|
||||
CheckThatDatabasenameIsCorrect=Vérifiez que le nom de base "<b>%s</b>" est correct.
|
||||
IfAlreadyExistsCheckOption=Si ce nom est correct et que cette base n'existe pas déjà, vous devez cocher l'option "Créer la base de donnée".
|
||||
IfAlreadyExistsCheckOption=Si ce nom est correct et que cette base n'existe pas déjà, vous devez cocher l'option "Créer la base de données".
|
||||
OpenBaseDir=Paramètre php openbasedir
|
||||
YouAskToCreateDatabaseSoRootRequired=Vous avez coché la case "Créer la base de donnée". Pour cela, le login/mot de passe du superutilisateur (en bas de formulaire) sont obligatoire.
|
||||
YouAskToCreateDatabaseUserSoRootRequired=Vous avez coché la case "Créer l'utilisateur propriétaire" de la base. Pour cela, le login/mot de passe du superutilisateur (en bas de formulaire) sont obligatoire.
|
||||
@@ -152,64 +154,64 @@ MigrationProposal=Migration de données sur les propositions commerciales
|
||||
MigrationInvoice=Migration de données sur les factures clients
|
||||
MigrationContract=Migration de données sur les contrats
|
||||
MigrationSuccessfullUpdate=Mise à jour réussie
|
||||
MigrationUpdateFailed=La mise à jour à échouée
|
||||
MigrationUpdateFailed=La mise à jour a échoué
|
||||
MigrationRelationshipTables=Migration des tables de liaison (%s)
|
||||
|
||||
# Payments Update
|
||||
MigrationPaymentsUpdate=Mise a jour des paiments (lien n-n paiements-factures)
|
||||
MigrationPaymentsNumberToUpdate=%s paiement(s) à mettre à jour
|
||||
MigrationProcessPaymentUpdate=Mise a jour paiement(s) %s
|
||||
MigrationPaymentsNothingToUpdate=Pas ou plus de paiements orphelins à corriger.
|
||||
MigrationPaymentsNothingUpdatable=Pas ou plus de paiements orphelins corrigeable.
|
||||
MigrationPaymentsUpdate=Mise à jour des paiements (lien n-n paiements-factures)
|
||||
MigrationPaymentsNumberToUpdate=%s paiement(s) a mettre à jour
|
||||
MigrationProcessPaymentUpdate=Mise à jour paiement(s) %s
|
||||
MigrationPaymentsNothingToUpdate=Pas ou plus de paiement orphelin à corriger.
|
||||
MigrationPaymentsNothingUpdatable=Pas ou plus de paiement orphelin corrigeable.
|
||||
|
||||
# Contracts Update
|
||||
MigrationContractsUpdate=Mise a jour des contrats sans details (gestion du contrat + detail de contrat)
|
||||
MigrationContractsNumberToUpdate=%s contrat(s) à mettre à jour
|
||||
MigrationContractsUpdate=Mise à jour des contrats sans détail (gestion du contrat + détail de contrat)
|
||||
MigrationContractsNumberToUpdate=%s contrat(s) a mettre à jour
|
||||
MigrationContractsLineCreation=Création ligne contrat pour contrat ref %s
|
||||
MigrationContractsNothingToUpdate=Pas ou plus de contrats (liés à un produit) sans lignes de details à corriger.
|
||||
MigrationContractsNothingToUpdate=Pas ou plus de contrats (liés à un produit) sans ligne de détail à corriger.
|
||||
MigrationContractsFieldDontExist=Le champs fk_facture n'existe plus. Pas d'opération à faire.
|
||||
|
||||
# Contracts Empty Dates Update
|
||||
MigrationContractsEmptyDatesUpdate=Mise a jour des dates de contrats non renseignées
|
||||
MigrationContractsEmptyDatesUpdate=Mise à jour des dates de contrats non renseignées
|
||||
MigrationContractsEmptyDatesUpdateSuccess=Ok pour date de contrat
|
||||
MigrationContractsEmptyDatesNothingToUpdate=Pas ou plus de date de contrats à renseigner.
|
||||
MigrationContractsEmptyCreationDatesUpdateSuccess=Ok pour date création
|
||||
MigrationContractsEmptyCreationDatesNothingToUpdate=Pas ou plus de date de création à renseigner.
|
||||
|
||||
# Contracts Invalid Dates Update
|
||||
MigrationContractsInvalidDatesUpdate=Mise a jour dates contrat incorrectes (pour contrats avec detail en service)
|
||||
MigrationContractsInvalidDatesUpdate=Mise à jour dates contrat incorrectes (pour contrats avec détail en service)
|
||||
MigrationContractsInvalidDateFix=Correction contrat %s (Date contrat=%s, Date mise service min=%s)
|
||||
MigrationContractsInvalidDatesNumber=%s contrats modifiés
|
||||
MigrationContractsInvalidDatesNothingToUpdate=Pas ou plus de contrats à corriger.
|
||||
|
||||
# Contracts Incoherent Dates Update
|
||||
MigrationContractsIncoherentCreationDateUpdate=Mise a jour des dates de création de contrat qui ont une valeur incohérente
|
||||
MigrationContractsIncoherentCreationDateUpdate=Mise à jour des dates de création de contrat qui ont une valeur incohérente
|
||||
MigrationContractsIncoherentCreationDateUpdateSuccess=Ok
|
||||
MigrationContractsIncoherentCreationDateNothingToUpdate=Pas ou plus de date de contrats à corriger.
|
||||
|
||||
# Reopening Contracts
|
||||
MigrationReopeningContracts=Reouverture des contrats qui ont au moins un service actif non fermé
|
||||
MigrationReopeningContracts=Réouverture des contrats qui ont au moins un service actif non fermé
|
||||
MigrationReopenThisContract=Réouverture contrat %s
|
||||
MigrationReopenedContractsNumber=%s contrats modifiés
|
||||
MigrationReopeningContractsNothingToUpdate=Pas ou plus de contrats à réouvrir.
|
||||
|
||||
# Migration transfert
|
||||
MigrationBankTransfertsUpdate=Mise a jour des liens entre ecriture bancaire et un transfert entre compte
|
||||
MigrationBankTransfertsUpdate=Mise à jour des liens entre écriture bancaire et un transfert entre compte
|
||||
MigrationBankTransfertsNothingToUpdate=Aucun lien non à jour
|
||||
|
||||
# Migration delivery
|
||||
MigrationShipmentOrderMatching=Mise a jour bon expedition
|
||||
MigrationDeliveryOrderMatching=Mise a jour bon reception
|
||||
MigrationDeliveryDetail=Mise a jour bon reception
|
||||
MigrationShipmentOrderMatching=Mise à jour bon expédition
|
||||
MigrationDeliveryOrderMatching=Mise à jour bon réception
|
||||
MigrationDeliveryDetail=Mise à jour bon réception
|
||||
|
||||
# Migration stock
|
||||
MigrationStockDetail=Mise a jour valeur en stock des produits
|
||||
MigrationStockDetail=Mise à jour valeur en stock des produits
|
||||
|
||||
# Migration menus
|
||||
MigrationMenusDetail=Mise a jour table des menus dynamiques
|
||||
MigrationMenusDetail=Mise à jour table des menus dynamiques
|
||||
|
||||
# Migration delivery address
|
||||
MigrationDeliveryAddress=Mise a jour des adresses de livraison dans les bons d'expedition
|
||||
MigrationDeliveryAddress=Mise à jour des adresses de livraison dans les bons d'expédition
|
||||
|
||||
# Migration project task actors
|
||||
MigrationProjectTaskActors=Migration de la table llx_projet_task_actors
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
CHARSET=UTF-8
|
||||
Project=Projet
|
||||
Projects=Projets
|
||||
SharedProject=Projet partagé
|
||||
SharedProject=Tout le monde
|
||||
PrivateProject=Contacts du projet
|
||||
Myprojects=Mes projets
|
||||
ProjectsArea=Espace projet
|
||||
NewProject=Nouveau projet
|
||||
|
||||
@@ -999,7 +999,7 @@ class DoliDb
|
||||
{
|
||||
$sql = "INSERT INTO user ";
|
||||
$sql.= "(Host,User,password,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Index_Priv,Alter_priv,Lock_tables_priv)";
|
||||
$sql.= " VALUES ('$dolibarr_main_db_host','$dolibarr_main_db_user',password('$dolibarr_main_db_pass')";
|
||||
$sql.= " VALUES ('".addslashes($dolibarr_main_db_host)."','".addslashes($dolibarr_main_db_user)."',password('".addslashes($dolibarr_main_db_pass)."')";
|
||||
$sql.= ",'Y','Y','Y','Y','Y','Y','Y','Y','Y')";
|
||||
|
||||
dol_syslog("mysql.lib::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log
|
||||
@@ -1012,7 +1012,7 @@ class DoliDb
|
||||
|
||||
$sql = "INSERT INTO db ";
|
||||
$sql.= "(Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Index_Priv,Alter_priv,Lock_tables_priv)";
|
||||
$sql.= " VALUES ('$dolibarr_main_db_host','$dolibarr_main_db_name','$dolibarr_main_db_user'";
|
||||
$sql.= " VALUES ('".addslashes($dolibarr_main_db_host)."','".addslashes($dolibarr_main_db_name)."','".addslashes($dolibarr_main_db_user)."'";
|
||||
$sql.= ",'Y','Y','Y','Y','Y','Y','Y','Y','Y')";
|
||||
|
||||
dol_syslog("mysql.lib::DDLCreateUser sql=".$sql,LOG_DEBUG);
|
||||
|
||||
@@ -1011,7 +1011,7 @@ class DoliDb
|
||||
{
|
||||
$sql = "INSERT INTO user ";
|
||||
$sql.= "(Host,User,password,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Index_Priv,Alter_priv,Lock_tables_priv)";
|
||||
$sql.= " VALUES ('$dolibarr_main_db_host','$dolibarr_main_db_user',password('$dolibarr_main_db_pass')";
|
||||
$sql.= " VALUES ('".addslashes($dolibarr_main_db_host)."','".addslashes($dolibarr_main_db_user)."',password('".addslashes($dolibarr_main_db_pass)."')";
|
||||
$sql.= ",'Y','Y','Y','Y','Y','Y','Y','Y','Y')";
|
||||
|
||||
dol_syslog("mysqli.lib::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log
|
||||
@@ -1024,7 +1024,7 @@ class DoliDb
|
||||
|
||||
$sql = "INSERT INTO db ";
|
||||
$sql.= "(Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Index_Priv,Alter_priv,Lock_tables_priv)";
|
||||
$sql.= " VALUES ('$dolibarr_main_db_host','$dolibarr_main_db_name','$dolibarr_main_db_user'";
|
||||
$sql.= " VALUES ('".addslashes($dolibarr_main_db_host)."','".addslashes($dolibarr_main_db_name)."','".addslashes($dolibarr_main_db_user)."'";
|
||||
$sql.= ",'Y','Y','Y','Y','Y','Y','Y','Y','Y')";
|
||||
|
||||
dol_syslog("mysqli.lib::DDLCreateUser sql=".$sql);
|
||||
|
||||
@@ -915,7 +915,7 @@ class DoliDb
|
||||
*/
|
||||
function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name)
|
||||
{
|
||||
$sql = "create user \"".$dolibarr_main_db_user."\" with password '".$dolibarr_main_db_pass."'";
|
||||
$sql = "create user \"".addslashes($dolibarr_main_db_user)."\" with password '".addslashes($dolibarr_main_db_pass)."'";
|
||||
|
||||
dol_syslog("pgsql.lib::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log
|
||||
$resql=$this->query($sql);
|
||||
|
||||
@@ -3246,4 +3246,76 @@ function addHelpMessage($inputId,$message)
|
||||
return $helpMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief For replace glob() function
|
||||
*/
|
||||
if (! function_exists('glob'))
|
||||
{
|
||||
function glob($pattern)
|
||||
{
|
||||
#get pathname (everything up until the last / or \)
|
||||
$path=$output=null;
|
||||
if(PHP_OS=='WIN32') $slash='\\';
|
||||
else $slash='/';
|
||||
$lastpos=strrpos($pattern,$slash);
|
||||
|
||||
if(!($lastpos===false))
|
||||
{
|
||||
$path=substr($pattern,0,-$lastpos-1);
|
||||
$pattern=substr($pattern,$lastpos);
|
||||
}
|
||||
else
|
||||
{
|
||||
#no dir info, use current dir
|
||||
$path=getcwd();
|
||||
}
|
||||
|
||||
$handle=@opendir($path);
|
||||
if($handle===false) return false;
|
||||
|
||||
while($dir=readdir($handle))
|
||||
{
|
||||
if(pattern_match($pattern,$dir)) $output[]=$dir;
|
||||
}
|
||||
|
||||
closedir($handle);
|
||||
|
||||
if(is_array($output)) return $output;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief For dol_glob() function
|
||||
*/
|
||||
function pattern_match($pattern,$string)
|
||||
{
|
||||
#basically prepare a regular expression
|
||||
$out=null;
|
||||
$chunks=explode(';',$pattern);
|
||||
foreach($chunks as $pattern)
|
||||
{
|
||||
$escape=array('$','^','.','{','}','(',')','[',']','|');
|
||||
while(strpos($pattern,'**')!==false) $pattern=str_replace('**','*',$pattern);
|
||||
|
||||
foreach($escape as $probe) $pattern=str_replace($probe,"\\$probe",$pattern);
|
||||
|
||||
$pattern=str_replace('?*','*',str_replace('*?','*',str_replace('*',".*",str_replace('?','.{1,1}',$pattern))));
|
||||
$out[]=$pattern;
|
||||
}
|
||||
|
||||
if(count($out)==1)
|
||||
{
|
||||
return(preg_match('/^'.$out[0].'$/i',$string));
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($out as $tester)
|
||||
{
|
||||
if(preg_match('/^'.$tester.'$/i',$string)) return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -463,11 +463,11 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='')
|
||||
$maskLike = dol_string_nospecial($mask);
|
||||
$maskLike = str_replace("%","_",$maskLike);
|
||||
// Replace protected special codes with matching number of _ as wild card caracter
|
||||
$maskLike = str_replace(dol_string_nospecial('{yyyy}'),'____',$maskLike);
|
||||
$maskLike = str_replace(dol_string_nospecial('{yy}'),'__',$maskLike);
|
||||
$maskLike = str_replace(dol_string_nospecial('{y}'),'_',$maskLike);
|
||||
$maskLike = str_replace(dol_string_nospecial('{mm}'),'__',$maskLike);
|
||||
$maskLike = str_replace(dol_string_nospecial('{dd}'),'__',$maskLike);
|
||||
$maskLike = preg_replace('/\{yyyy\}/i','____',$maskLike);
|
||||
$maskLike = preg_replace('/\{yy\}/i','__',$maskLike);
|
||||
$maskLike = preg_replace('/\{y\}/i','_',$maskLike);
|
||||
$maskLike = preg_replace('/\{mm\}/i','__',$maskLike);
|
||||
$maskLike = preg_replace('/\{dd\}/i','__',$maskLike);
|
||||
$maskLike = str_replace(dol_string_nospecial('{'.$masktri.'}'),str_pad("",strlen($maskcounter),"_"),$maskLike);
|
||||
if ($maskrefclient) $maskLike = str_replace(dol_string_nospecial('{'.$maskrefclient.'}'),str_pad("",strlen($maskrefclient),"_"),$maskLike);
|
||||
//if ($masktype) $maskLike = str_replace(dol_string_nospecial('{'.$masktype.'}'),str_pad("",strlen($masktype),"_"),$maskLike);
|
||||
|
||||
@@ -147,10 +147,10 @@ function task_prepare_head($object)
|
||||
*/
|
||||
function select_projects($socid, $selected='', $htmlname='projectid')
|
||||
{
|
||||
global $db,$conf,$langs;
|
||||
global $db,$user,$conf,$langs;
|
||||
|
||||
// On recherche les projets
|
||||
$sql = 'SELECT p.rowid, p.ref, p.title, p.fk_soc';
|
||||
$sql = 'SELECT p.rowid, p.ref, p.title, p.fk_soc, p.fk_statut, p.public';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX .'projet as p';
|
||||
$sql.= " WHERE (p.fk_soc='".$socid."' OR p.fk_soc IS NULL)";
|
||||
$sql.= " AND p.entity = ".$conf->entity;
|
||||
@@ -170,7 +170,8 @@ function select_projects($socid, $selected='', $htmlname='projectid')
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$labeltoshow=dol_trunc($obj->ref,12).' - '.dol_trunc($obj->title,12);
|
||||
if (empty($obj->fk_soc)) $labeltoshow.=' ('.$langs->trans("SharedProject").')';
|
||||
//if ($obj->public) $labeltoshow.=' ('.$langs->trans("SharedProject").')';
|
||||
//else $labeltoshow.=' ('.$langs->trans("Private").')';
|
||||
if (!empty($selected) && $selected == $obj->rowid)
|
||||
{
|
||||
print '<option value="'.$obj->rowid.'" selected="true">'.$labeltoshow.'</option>';
|
||||
@@ -201,10 +202,10 @@ function select_projects($socid, $selected='', $htmlname='projectid')
|
||||
* @param unknown_type $parent
|
||||
* @param unknown_type $lines
|
||||
* @param unknown_type $level
|
||||
* @param unknown_type $tasksrole
|
||||
* @param unknown_type $projectsrole
|
||||
* @return unknown
|
||||
*/
|
||||
function PLinesb(&$inc, $parent, $lines, &$level, &$tasksrole)
|
||||
function PLinesb(&$inc, $parent, $lines, &$level, &$projectsrole)
|
||||
{
|
||||
global $user, $bc, $langs;
|
||||
global $form;
|
||||
@@ -241,6 +242,8 @@ function PLinesb(&$inc, $parent, $lines, &$level, &$tasksrole)
|
||||
print "<td>";
|
||||
$projectstatic->id=$lines[$i]->projectid;
|
||||
$projectstatic->ref=$lines[$i]->projectref;
|
||||
$projectstatic->public=$lines[$i]->public;
|
||||
$projectstatic->label=$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->projectid];
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print "</td>";
|
||||
|
||||
@@ -249,24 +252,23 @@ function PLinesb(&$inc, $parent, $lines, &$level, &$tasksrole)
|
||||
$minutes = substr("00"."$minutes", -2);
|
||||
print '<td align="right">'.$heure." h ".$minutes."</td>\n";
|
||||
|
||||
if ($tasksrole[$lines[$i]->id] == 'TASKEXECUTIVE')
|
||||
{
|
||||
print '<td nowrap="nowrap">';
|
||||
print $form->select_date('',$lines[$i]->id,'','','',"addtime");
|
||||
print ' <input size="4" type="text" class="flat" name="task'.$lines[$i]->id.'" value="">';
|
||||
print ' <input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
print '</td>';
|
||||
print "<td> ";
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="2"> </td>';
|
||||
}
|
||||
$disabled=1;
|
||||
// If at least one role for project
|
||||
if ($lines[$i]->public || ! empty($projectsrole[$lines[$i]->projectid])) $disabled=0;
|
||||
|
||||
print '<td nowrap="nowrap">';
|
||||
print $form->select_date('',$lines[$i]->id,'','','',"addtime");
|
||||
print ' <input size="4" type="text" class="flat"'.($disabled?' disabled="true"':'').' name="task'.$lines[$i]->id.'" value="">';
|
||||
print ' <input type="submit" class="button"'.($disabled?' disabled="true"':'').' value="'.$langs->trans("Add").'">';
|
||||
if ((! $lines[$i]->public) && $disabled) print '('.$langs->trans("YouAreNotContactOfProject").')';
|
||||
print '</td>';
|
||||
print "<td> ";
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$inc++;
|
||||
$level++;
|
||||
if ($lines[$i]->id) PLinesb($inc, $lines[$i]->id, $lines, $level, $tasksrole);
|
||||
if ($lines[$i]->id) PLinesb($inc, $lines[$i]->id, $lines, $level, $projectsrole);
|
||||
$level--;
|
||||
}
|
||||
else
|
||||
@@ -353,6 +355,7 @@ function PLines(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole
|
||||
{
|
||||
$taskstatic->id=$lines[$i]->id;
|
||||
$taskstatic->ref=$lines[$i]->id;
|
||||
$taskstatic->label=($taskrole[$lines[$i]->id]?$langs->trans("YourRole").': '.$taskrole[$lines[$i]->id]:'');
|
||||
print $taskstatic->getNomUrl(1);
|
||||
}
|
||||
print '</td>';
|
||||
@@ -499,7 +502,83 @@ function clean_orphelins($db)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return HTML table with list of projects and number of opened tasks
|
||||
*
|
||||
* @param unknown_type $db
|
||||
* @param unknown_type $mine
|
||||
* @param unknown_type $socid
|
||||
* @param unknown_type $projectsListId
|
||||
*/
|
||||
function print_projecttasks_array($db,$mine,$socid,$projectsListId)
|
||||
{
|
||||
global $langs,$conf,$user;
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/projet/project.class.php");
|
||||
|
||||
$projectstatic=new Project($db);
|
||||
|
||||
$sortfield='';
|
||||
$sortorder='';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Project"),"index.php","","","","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("NbOpenTasks"),"","","","",'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),"","","","",'align="right"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
$sql = "SELECT p.rowid as projectid, p.ref, p.title, p.fk_user_creat, p.public, p.fk_statut, count(t.rowid) as nb";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t ON p.rowid = t.fk_projet";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
if ($mine) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
||||
if ($socid) $sql.= " AND p.fk_soc = ".$socid;
|
||||
$sql.= " GROUP BY p.ref";
|
||||
|
||||
$var=true;
|
||||
$resql = $db->query($sql);
|
||||
if ( $resql )
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
$projectstatic->id = $objp->projectid;
|
||||
$projectstatic->user_author_id = $objp->fk_user_creat;
|
||||
$projectstatic->public = $objp->public;
|
||||
|
||||
$userAccess = $projectstatic->restrictedProjectArea($user,1);
|
||||
|
||||
if ($userAccess >= 0)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td nowrap="nowrap">';
|
||||
$projectstatic->ref=$objp->ref;
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print ' - '.$objp->title.'</td>';
|
||||
print '<td align="right">'.$objp->nb.'</td>';
|
||||
$projectstatic->statut = $objp->fk_statut;
|
||||
print '<td align="right">'.$projectstatic->getLibStatut(3).'</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
print "</table>";
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -171,7 +171,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
|
||||
while (($subdir = readdir($handle))!==false)
|
||||
{
|
||||
if (is_dir($dirtheme."/".$subdir) && substr($subdir, 0, 1) <> '.'
|
||||
&& substr($subdir, 0, 3) <> 'CVS' && ! preg_match('/common/i',$subdir))
|
||||
&& substr($subdir, 0, 3) <> 'CVS' && ! preg_match('/common|phones/i',$subdir))
|
||||
{
|
||||
if ($i % $thumbsbyrow == 0)
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
define('DOL_VERSION','2.8.0-beta'); // Also defined in htdocs/install/inc.php
|
||||
define('DOL_VERSION','2.8.1'); // Also defined in htdocs/install/inc.php
|
||||
define('EURO',chr(128));
|
||||
|
||||
// Definition des constantes syslog
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2007 Jean Heimburger <jean@tiaris.info>
|
||||
*
|
||||
@@ -2437,7 +2437,7 @@ class Product extends CommonObject
|
||||
|
||||
if (! utf8_check($file)) $file=utf8_encode($file); // To be sure date is stored in UTF8 in memory
|
||||
|
||||
if (dol_is_file($dir.$file))
|
||||
if (dol_is_file($dir.$file) && preg_match('/(\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i',$dir.$file))
|
||||
{
|
||||
$nbphoto++;
|
||||
$photo = $file;
|
||||
|
||||
@@ -44,7 +44,7 @@ if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result=restrictedArea($user,'produit|service',$id,'product','','',$fieldid);
|
||||
|
||||
$mesg = '';
|
||||
|
||||
$dir = (!empty($conf->produit->dir_output)?$conf->produit->dir_output:$conf->service->dir_output);
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@@ -57,20 +57,20 @@ if ($_FILES['userfile']['size'] > 0 && $_POST["sendit"] && ! empty($conf->global
|
||||
$product = new Product($db);
|
||||
$result = $product->fetch($_GET["id"]);
|
||||
|
||||
$result = $product->add_photo($conf->produit->dir_output, $_FILES['userfile']);
|
||||
$result = $product->add_photo($dir, $_FILES['userfile']);
|
||||
}
|
||||
}
|
||||
|
||||
if ($_REQUEST["action"] == 'confirm_delete' && $_GET["file"] && $_REQUEST['confirm'] == 'yes' && ($user->rights->produit->creer || $user->rights->service->creer))
|
||||
{
|
||||
$product = new Product($db);
|
||||
$product->delete_photo($conf->produit->dir_output."/".$_GET["file"]);
|
||||
$product->delete_photo($dir."/".$_GET["file"]);
|
||||
}
|
||||
|
||||
if ($_GET["action"] == 'addthumb' && $_GET["file"])
|
||||
{
|
||||
$product = new Product($db);
|
||||
$product->add_thumb($conf->produit->dir_output."/".$_GET["file"]);
|
||||
$product->add_thumb($dir."/".$_GET["file"]);
|
||||
}
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
$maxHeight = 120;
|
||||
|
||||
$pdir = get_exdir($product->id,2) . $product->id ."/photos/";
|
||||
$dir = $conf->produit->dir_output . '/'. $pdir;
|
||||
$dir = $dir . '/'. $pdir;
|
||||
|
||||
print '<br>';
|
||||
print '<table width="100%" valign="top" align="center" border="0" cellpadding="2" cellspacing="2">';
|
||||
|
||||
@@ -138,7 +138,7 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
// Generation des graphs
|
||||
$WIDTH=380;
|
||||
$HEIGHT=160;
|
||||
$dir = $conf->produit->dir_temp;
|
||||
$dir = (!empty($conf->produit->dir_temp)?$conf->produit->dir_temp:$conf->service->dir_temp);
|
||||
if (! file_exists($dir.'/'.$product->id))
|
||||
{
|
||||
if (create_exdir($dir.'/'.$product->id) < 0)
|
||||
|
||||
@@ -276,9 +276,7 @@ class Entrepot extends CommonObject
|
||||
*/
|
||||
function info($id)
|
||||
{
|
||||
$sql = "SELECT e.rowid, e.datec,";
|
||||
$sql .= " e.datem,";
|
||||
$sql .= " fk_user_author";
|
||||
$sql = "SELECT e.rowid, e.datec, e.tms as datem, e.fk_user_author";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e";
|
||||
$sql .= " WHERE e.rowid = ".$id;
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ class MouvementStock
|
||||
dol_syslog("MouvementStock::_create sql=".$sql, LOG_DEBUG);
|
||||
if ($resql = $this->db->query($sql))
|
||||
{
|
||||
$mvid = $this->db->last_insert_id($resql);
|
||||
$mvid = $this->db->last_insert_id(MAIN_DB_PREFIX."stock_mouvement");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -19,16 +19,16 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/projet/activity/myactivity.php
|
||||
* \file htdocs/projet/activity/index.php
|
||||
* \ingroup projet
|
||||
* \brief Page activite perso du module projet
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/project.lib.php");
|
||||
|
||||
$mode=$_REQUEST["mode"];
|
||||
|
||||
$mine = $_REQUEST['mode']=='mine' ? 1 : 0;
|
||||
|
||||
// Security check
|
||||
if (!$user->rights->projet->lire) accessforbidden();
|
||||
@@ -48,7 +48,6 @@ $now = gmmktime();
|
||||
|
||||
$projectstatic=new Project($db);
|
||||
|
||||
$mine = $_REQUEST['mode']=='mine' ? 1 : 0;
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1);
|
||||
|
||||
$title=$langs->trans("Activities");
|
||||
@@ -61,67 +60,12 @@ print_fiche_titre($title);
|
||||
print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||
print '<tr><td width="30%" valign="top" class="notopnoleft">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Project"),"index.php","","","","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("NbOpenTasks"),"","","","",'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),"","","","",'align="right"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
$sql = "SELECT p.rowid as projectid, p.ref, p.title, p.fk_user_creat, p.public, p.fk_statut, count(t.rowid) as nb";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."projet_task as t";
|
||||
$sql.= " WHERE t.fk_projet = p.rowid";
|
||||
$sql.= " AND p.entity = ".$conf->entity;
|
||||
if ($mine) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
||||
if ($socid) $sql.= " AND p.fk_soc = ".$socid;
|
||||
$sql.= " GROUP BY p.ref";
|
||||
print_projecttasks_array($db,$mine,$socid,$projectsListId);
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ( $resql )
|
||||
{
|
||||
$var=true;
|
||||
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
$projectstatic->id = $objp->projectid;
|
||||
$projectstatic->user_author_id = $objp->fk_user_creat;
|
||||
$projectstatic->public = $objp->public;
|
||||
|
||||
$userAccess = $projectstatic->restrictedProjectArea($user,1);
|
||||
|
||||
if ($userAccess >= 0)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td nowrap="nowrap">';
|
||||
$projectstatic->ref=$objp->ref;
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print ' - '.$objp->title.'</td>';
|
||||
print '<td align="right">'.$objp->nb.'</td>';
|
||||
$projectstatic->statut = $objp->fk_statut;
|
||||
print '<td align="right">'.$projectstatic->getLibStatut(3).'</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
/* Affichage de la liste des projets d'aujourd'hui */
|
||||
print '<br /><table class="noborder" width="100%">';
|
||||
print '<br><table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="50%">'.$langs->trans('Today').'</td>';
|
||||
print '<td width="50%" align="right">'.$langs->trans("Time").'</td>';
|
||||
@@ -143,7 +87,7 @@ if ( $resql )
|
||||
{
|
||||
$var=true;
|
||||
$total=0;
|
||||
|
||||
|
||||
while ($row = $db->fetch_object($resql))
|
||||
{
|
||||
$var=!$var;
|
||||
@@ -193,7 +137,7 @@ if ( $resql )
|
||||
{
|
||||
$var=true;
|
||||
$total=0;
|
||||
|
||||
|
||||
while ($row = $db->fetch_object($resql))
|
||||
{
|
||||
$var=!$var;
|
||||
@@ -245,7 +189,7 @@ if ( $resql )
|
||||
{
|
||||
$total = 0;
|
||||
$var=true;
|
||||
|
||||
|
||||
while ($row = $db->fetch_object($resql))
|
||||
{
|
||||
$var=!$var;
|
||||
@@ -294,7 +238,7 @@ $resql = $db->query($sql);
|
||||
if ( $resql )
|
||||
{
|
||||
$var=false;
|
||||
|
||||
|
||||
while ($row = $db->fetch_object($resql))
|
||||
{
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
@@ -112,9 +112,9 @@ print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorde
|
||||
if ($mesg) print $mesg;
|
||||
|
||||
$tasksarray=$task->getTasksArray(0,0,$project->id,$socid);
|
||||
$tasksrole=$task->getUserRolesForProjectsOrTasks($user,0,$project->id,0);
|
||||
$projectsrole=$task->getUserRolesForProjectsOrTasks($user,0,$project->id,0);
|
||||
//var_dump($tasksarray);
|
||||
//var_dump($tasksrole);
|
||||
//var_dump($projectsrole);
|
||||
|
||||
print '<form name="addtime" method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$project->id.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@@ -128,7 +128,7 @@ print '<td>'.$langs->trans("Project").'</td>';
|
||||
print '<td align="right">'.$langs->trans("TimeSpent").'</td>';
|
||||
print '<td colspan="2">'.$langs->trans("AddDuration").'</td>';
|
||||
print "</tr>\n";
|
||||
PLinesb($j, 0, $tasksarray, $level, $tasksrole);
|
||||
PLinesb($j, 0, $tasksarray, $level, $projetsrole);
|
||||
print '</form>';
|
||||
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ if ($id > 0 || ! empty($ref))
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($project->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('Private');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
|
||||
@@ -92,7 +92,7 @@ print '</td></tr>';
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($project->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('Private');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
|
||||
@@ -86,7 +86,8 @@ if ($_POST["action"] == 'add' && $user->rights->projet->creer)
|
||||
$result = $project->create($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
$result = $project->add_contact($_POST["officer_project"], 'PROJECTLEADER', 'internal');
|
||||
// Add myself as project leader
|
||||
$result = $project->add_contact($user->id, 'PROJECTLEADER', 'internal');
|
||||
|
||||
Header("Location:fiche.php?id=".$project->id);
|
||||
exit;
|
||||
@@ -276,7 +277,7 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
|
||||
|
||||
// Public
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
$array=array(0 => $langs->trans("Private"),1 => $langs->trans("SharedProject"));
|
||||
$array=array(0 => $langs->trans("PrivateProject"),1 => $langs->trans("SharedProject"));
|
||||
$html->select_array('public',$array,$project->public);
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -370,7 +371,7 @@ else
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
$array=array(0 => $langs->trans("Private"),1 => $langs->trans("SharedProject"));
|
||||
$array=array(0 => $langs->trans("PrivateProject"),1 => $langs->trans("SharedProject"));
|
||||
$html->select_array('public',$array,$project->public);
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -421,7 +422,7 @@ else
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($project->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('Private');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/project.lib.php");
|
||||
|
||||
$mine = $_REQUEST['mode']=='mine' ? 1 : 0;
|
||||
|
||||
$langs->load("projects");
|
||||
|
||||
// Security check
|
||||
@@ -43,7 +47,6 @@ if (!$user->rights->projet->lire) accessforbidden();
|
||||
$socstatic=new Societe($db);
|
||||
$projectstatic=new Project($db);
|
||||
|
||||
$mine = $_REQUEST['mode']=='mine' ? 1 : 0;
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1);
|
||||
|
||||
llxHeader("",$langs->trans("Projects"),"EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos");
|
||||
@@ -56,62 +59,7 @@ print_fiche_titre($text);
|
||||
print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||
print '<tr><td width="30%" valign="top" class="notopnoleft">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Project"),"index.php","","","","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("NbOpenTasks"),"","","","",'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),"","","","",'align="right"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
$sql = "SELECT p.rowid as projectid, p.ref, p.title, p.fk_user_creat, p.public, p.fk_statut, count(t.rowid) as nb";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t ON p.rowid = t.fk_projet";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
if ($mine) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
||||
if ($socid) $sql.= " AND p.fk_soc = ".$socid;
|
||||
$sql.= " GROUP BY p.ref";
|
||||
|
||||
$var=true;
|
||||
$resql = $db->query($sql);
|
||||
if ( $resql )
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
$projectstatic->id = $objp->projectid;
|
||||
$projectstatic->user_author_id = $objp->fk_user_creat;
|
||||
$projectstatic->public = $objp->public;
|
||||
|
||||
$userAccess = $projectstatic->restrictedProjectArea($user,1);
|
||||
|
||||
if ($userAccess >= 0)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td nowrap="nowrap">';
|
||||
$projectstatic->ref=$objp->ref;
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print ' - '.$objp->title.'</td>';
|
||||
print '<td align="right">'.$objp->nb.'</td>';
|
||||
$projectstatic->statut = $objp->fk_statut;
|
||||
print '<td align="right">'.$projectstatic->getLibStatut(3).'</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
print "</table>";
|
||||
print_projecttasks_array($db,$mine,$socid,$projectsListId);
|
||||
|
||||
print '</td><td width="70%" valign="top" class="notopnoleft">';
|
||||
|
||||
|
||||
@@ -132,29 +132,29 @@ if ($resql)
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
|
||||
$projectstatic->id = $objp->projectid;
|
||||
$projectstatic->user_author_id = $objp->fk_user_creat;
|
||||
$projectstatic->public = $objp->public;
|
||||
|
||||
|
||||
$userAccess = $projectstatic->restrictedProjectArea($user,1);
|
||||
|
||||
|
||||
if ($userAccess >= 0)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
|
||||
// Project url
|
||||
print "<td>";
|
||||
$projectstatic->ref = $objp->ref;
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print "</td>";
|
||||
|
||||
|
||||
// Title
|
||||
print '<td>';
|
||||
print dol_trunc($objp->title,24);
|
||||
print '</td>';
|
||||
|
||||
|
||||
// Company
|
||||
print '<td>';
|
||||
if ($objp->socid)
|
||||
@@ -168,21 +168,21 @@ if ($resql)
|
||||
print ' ';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
// Visibility
|
||||
print '<td align="left">';
|
||||
if ($objp->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('Private');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td>';
|
||||
|
||||
|
||||
// Status
|
||||
$projectstatic->statut = $objp->fk_statut;
|
||||
print '<td align="right">'.$projectstatic->getLibStatut(3).'</td>';
|
||||
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
}
|
||||
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ if ($id > 0 || ! empty($ref))
|
||||
if ($project->fetch($id, $ref))
|
||||
{
|
||||
if ($project->societe->id > 0) $result=$project->societe->fetch($project->societe->id);
|
||||
|
||||
|
||||
// To verify role of users
|
||||
$userAccess = $project->restrictedProjectArea($user);
|
||||
|
||||
@@ -132,7 +132,7 @@ if ($id > 0 || ! empty($ref))
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($project->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('Private');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
|
||||
@@ -58,8 +58,8 @@ class Project extends CommonObject
|
||||
var $statuts;
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
* \param DB handler acces base de donnees
|
||||
* \brief Constructor
|
||||
* \param DB Database handler
|
||||
*/
|
||||
function Project($DB)
|
||||
{
|
||||
@@ -521,7 +521,7 @@ class Project extends CommonObject
|
||||
|
||||
$picto='project';
|
||||
|
||||
$label=$langs->trans("ShowProject").': '.$this->ref;
|
||||
$label=$langs->trans("ShowProject").': '.$this->ref.($this->label?' - '.$this->label:'');
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
@@ -604,7 +604,7 @@ class Project extends CommonObject
|
||||
$xnbp++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Check permissions
|
||||
*/
|
||||
@@ -622,7 +622,7 @@ class Project extends CommonObject
|
||||
{
|
||||
$userRole = $this->liste_contact(4,$source);
|
||||
$num=sizeof($userRole);
|
||||
|
||||
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
@@ -634,7 +634,7 @@ class Project extends CommonObject
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!$userAccess && !$this->public)
|
||||
{
|
||||
if (!$list)
|
||||
@@ -645,12 +645,12 @@ class Project extends CommonObject
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $userAccess;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return array of projects authorized for a user
|
||||
*
|
||||
@@ -669,7 +669,7 @@ class Project extends CommonObject
|
||||
$sql.= ", ".MAIN_DB_PREFIX."element_contact as ec";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."c_type_contact as ctc";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
|
||||
|
||||
if ($mine)
|
||||
{
|
||||
$sql.= " AND ec.element_id = p.rowid";
|
||||
@@ -699,9 +699,9 @@ class Project extends CommonObject
|
||||
$temp[] = $row[0];
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
$this->db->free($resql);
|
||||
|
||||
|
||||
if ($list)
|
||||
{
|
||||
if (empty($temp)) return 0;
|
||||
|
||||
@@ -229,7 +229,7 @@ else
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($project->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('Private');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
@@ -244,9 +244,9 @@ else
|
||||
*/
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if ($user->rights->projet->creer)
|
||||
if ($user->rights->projet->all->creer || $user->rights->projet->creer)
|
||||
{
|
||||
if ($userAccess)
|
||||
if ($project->public || $userAccess)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$project->id.'&action=create'.$param.'">'.$langs->trans('AddTask').'</a>';
|
||||
}
|
||||
|
||||
@@ -398,7 +398,7 @@ class Task extends CommonObject
|
||||
|
||||
$picto='projecttask';
|
||||
|
||||
$label=$langs->trans("ShowTask").': '.$this->ref;
|
||||
$label=$langs->trans("ShowTask").': '.$this->ref.($this->label?' - '.$this->label:'');
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
@@ -495,6 +495,7 @@ class Task extends CommonObject
|
||||
$tasks[$i]->description = $obj->description;
|
||||
$tasks[$i]->fk_parent = $obj->fk_task_parent;
|
||||
$tasks[$i]->duration = $obj->duration_effective;
|
||||
$tasks[$i]->public = $obj->public;
|
||||
}
|
||||
|
||||
$i++;
|
||||
@@ -510,17 +511,20 @@ class Task extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Return Array of role of user for each projects or each tasks
|
||||
* Return list of roles for a user for each projects or each tasks (or a particular project or task)
|
||||
* @param userp
|
||||
* @param usert
|
||||
* @param projectid
|
||||
* @param taskid
|
||||
* @return array Array of role of user for each projects or each tasks
|
||||
* @param usert Deprecated. Permissions are on project.
|
||||
* @param projectid Project id to filter on a project
|
||||
* @param taskid Task id to filter on a task
|
||||
* @return array Array (projectid => 'list of roles for project')
|
||||
*/
|
||||
function getUserRolesForProjectsOrTasks($userp,$usert,$projectid=0,$taskid=0)
|
||||
{
|
||||
$projectsrole = array();
|
||||
$tasksrole = array();
|
||||
|
||||
dol_syslog("Task::getUserRolesForProjectsOrTasks userp=".is_object($userp)." usert=".is_object($usert)." projectid=".$projectid." taskid=".$taskid);
|
||||
|
||||
// We want role of user for projet or role of user for task. Both are not possible.
|
||||
if (empty($userp) && empty($usert))
|
||||
{
|
||||
@@ -528,8 +532,8 @@ class Task extends CommonObject
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Liste des taches et role sur la tache du user courant dans $tasksrole */
|
||||
$sql = "SELECT ec.element_id, ctc.code";
|
||||
/* Liste des taches et role sur les projets ou taches */
|
||||
$sql = "SELECT pt.rowid as pid, ec.element_id, ctc.code";
|
||||
if ($userp) $sql.= " FROM ".MAIN_DB_PREFIX."projet as pt";
|
||||
if ($usert) $sql.= " FROM ".MAIN_DB_PREFIX."projet_task as pt";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."element_contact as ec";
|
||||
@@ -543,8 +547,8 @@ class Task extends CommonObject
|
||||
$sql.= " AND ec.statut = 4";
|
||||
if ($projectid)
|
||||
{
|
||||
if ($userp || $usert) $sql.= " AND pt.fk_projet = ".$projectid;
|
||||
//if ($usert) $sql.= " AND pt.rowid = ".$taskid;
|
||||
if ($userp) $sql.= " AND pt.rowid = ".$projectid;
|
||||
if ($usert) $sql.= " AND pt.fk_projet = ".$projectid;
|
||||
}
|
||||
if ($taskid)
|
||||
{
|
||||
@@ -552,7 +556,8 @@ class Task extends CommonObject
|
||||
if ($usert) $sql.= " AND pt.rowid = ".$taskid;
|
||||
}
|
||||
|
||||
dol_syslog("Task::getTasksForProjectOwnedByAUser sql=".$sql);
|
||||
//print $sql;
|
||||
dol_syslog("Task::getUserRolesForProjectsOrTasks sql=".$sql);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@@ -560,8 +565,9 @@ class Task extends CommonObject
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $this->db->fetch_row($resql);
|
||||
$tasksrole[$row[0]] = $row[1];
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
if (empty($projectsrole[$obj->pid])) $projectsrole[$obj->pid] = $obj->code;
|
||||
else $projectsrole[$obj->pid].=','.$obj->code;
|
||||
$i++;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
@@ -571,7 +577,7 @@ class Task extends CommonObject
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
return $tasksrole;
|
||||
return $projectsrole;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -96,7 +96,8 @@ if ($_GET["id"] > 0)
|
||||
/*
|
||||
* List of time spent
|
||||
*/
|
||||
$sql = "SELECT t.task_date, t.task_duration, t.fk_user, u.login, u.rowid";
|
||||
$sql = "SELECT t.task_date, t.task_duration, t.fk_user";
|
||||
$sql.= ", u.rowid, u.name, u.firstname";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " WHERE t.fk_task =".$task->id;
|
||||
@@ -156,7 +157,7 @@ if ($_GET["id"] > 0)
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
// Date
|
||||
print '<td>'.dol_print_date($db->jdate($task_time->task_date),'day').' '.dol_print_date($db->jdate($task_time->task_date),'%A').'</td>';
|
||||
print '<td>'.dol_print_date($db->jdate($task_time->task_date),'%A').' '.dol_print_date($db->jdate($task_time->task_date),'daytext').'</td>';
|
||||
|
||||
// Time spent
|
||||
$heure = intval($task_time->task_duration);
|
||||
@@ -165,8 +166,9 @@ if ($_GET["id"] > 0)
|
||||
print '<td align="right">'.$heure." h ".$minutes."</td>\n";
|
||||
|
||||
// User
|
||||
$user->id=$task_time->rowid;
|
||||
$user->nom=$task_time->login;
|
||||
$user->id = $task_time->rowid;
|
||||
$user->nom = $task_time->name;
|
||||
$user->prenom = $task_time->firstname;
|
||||
print '<td align="right">'.$user->getNomUrl(1).'</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ class Propal extends CommonObject
|
||||
var $adresse;
|
||||
|
||||
var $products=array();
|
||||
|
||||
|
||||
var $lines = array();
|
||||
|
||||
var $labelstatut=array();
|
||||
@@ -729,6 +729,10 @@ class Propal extends CommonObject
|
||||
$object->id=0;
|
||||
$object->statut=0;
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT ."/societe.class.php");
|
||||
$objsoc=new Societe($this->db);
|
||||
$objsoc->fetch($object->socid);
|
||||
|
||||
if (empty($conf->global->PROPALE_ADDON) || ! is_readable(DOL_DOCUMENT_ROOT ."/includes/modules/propale/".$conf->global->PROPALE_ADDON.".php"))
|
||||
{
|
||||
$this->error='ErrorSetupNotComplete';
|
||||
@@ -738,7 +742,7 @@ class Propal extends CommonObject
|
||||
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/propale/".$conf->global->PROPALE_ADDON.".php");
|
||||
$obj = $conf->global->PROPALE_ADDON;
|
||||
$modPropale = new $obj;
|
||||
$numpr = $modPropale->getNextValue($soc,$object);
|
||||
$numpr = $modPropale->getNextValue($objsoc,$object);
|
||||
|
||||
// Clear fields
|
||||
$object->ref = $numpr;
|
||||
@@ -1996,6 +2000,8 @@ class Propal extends CommonObject
|
||||
*/
|
||||
function verifyNumRef($soc)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT rowid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."propal";
|
||||
$sql.= " WHERE ref = '".$this->ref."'";
|
||||
|
||||
@@ -558,7 +558,7 @@ $_GET["action"] == 'create' || $_POST["action"] == 'create')
|
||||
print '</td>';
|
||||
}
|
||||
else print '<td> </td><td> </td>';
|
||||
// IdProf4 (NU pour France)
|
||||
// IdProf4 (RCS pour France)
|
||||
$idprof=$langs->transcountry('ProfId4',$soc->pays_code);
|
||||
if ($idprof!='-')
|
||||
{
|
||||
|
||||
@@ -73,11 +73,11 @@ class Societe extends CommonObject
|
||||
|
||||
var $tva_assuj;
|
||||
var $tva_intra;
|
||||
|
||||
|
||||
// Local taxes
|
||||
var $localtax1_assuj;
|
||||
var $localtax2_assuj;
|
||||
|
||||
|
||||
var $capital;
|
||||
var $typent_id;
|
||||
var $typent_code;
|
||||
@@ -367,7 +367,7 @@ class Societe extends CommonObject
|
||||
|
||||
$this->tva_assuj=trim($this->tva_assuj);
|
||||
$this->tva_intra=dol_sanitizeFileName($this->tva_intra,'');
|
||||
|
||||
|
||||
// Local taxes
|
||||
$this->localtax1_assuj=trim($this->localtax1_assuj);
|
||||
$this->localtax2_assuj=trim($this->localtax2_assuj);
|
||||
@@ -425,13 +425,13 @@ class Societe extends CommonObject
|
||||
$sql .= ",ape = '". addslashes($this->ape) ."'";
|
||||
$sql .= ",idprof4 = '". addslashes($this->idprof4) ."'";
|
||||
|
||||
$sql .= ",tva_assuj = ".($this->tva_assuj>=0?"'".$this->tva_assuj."'":"null");
|
||||
$sql .= ",tva_assuj = ".($this->tva_assuj!=''?"'".$this->tva_assuj."'":"null");
|
||||
$sql .= ",tva_intra = '" . addslashes($this->tva_intra) ."'";
|
||||
|
||||
|
||||
// Local taxes
|
||||
$sql .= ",localtax1_assuj = ".($this->localtax1_assuj>=0?"'".$this->localtax1_assuj."'":"null");
|
||||
$sql .= ",localtax2_assuj = ".($this->localtax2_assuj>=0?"'".$this->localtax2_assuj."'":"null");
|
||||
|
||||
$sql .= ",localtax1_assuj = ".($this->localtax1_assuj!=''?"'".$this->localtax1_assuj."'":"null");
|
||||
$sql .= ",localtax2_assuj = ".($this->localtax2_assuj!=''?"'".$this->localtax2_assuj."'":"null");
|
||||
|
||||
$sql .= ",capital = '" . addslashes($this->capital) ."'";
|
||||
|
||||
$sql .= ",prefix_comm = ".($this->prefix_comm?"'".addslashes($this->prefix_comm)."'":"null");
|
||||
@@ -643,11 +643,11 @@ class Societe extends CommonObject
|
||||
|
||||
$this->tva_assuj = $obj->tva_assuj;
|
||||
$this->tva_intra = $obj->tva_intra;
|
||||
|
||||
|
||||
// Local Taxes
|
||||
$this->localtax1_assuj = $obj->localtax1_assuj;
|
||||
$this->localtax2_assuj = $obj->localtax2_assuj;
|
||||
|
||||
|
||||
|
||||
$this->typent_id = $obj->typent_id;
|
||||
$this->typent_code = $obj->typent_code;
|
||||
@@ -1919,7 +1919,7 @@ class Societe extends CommonObject
|
||||
'LT', // Lithuania
|
||||
'LU', // Luxembourg
|
||||
'LV', // Latvia
|
||||
'MO', // Monaco Seems to use same IntraVAT than France (http://www.gouv.mc/devwww/wwwnew.nsf/c3241c4782f528bdc1256d52004f970b/9e370807042516a5c1256f81003f5bb3!OpenDocument)
|
||||
'MC', // Monaco Seems to use same IntraVAT than France (http://www.gouv.mc/devwww/wwwnew.nsf/c3241c4782f528bdc1256d52004f970b/9e370807042516a5c1256f81003f5bb3!OpenDocument)
|
||||
'MT', // Malta
|
||||
//'NO', // Norway
|
||||
'PL', // Poland
|
||||
@@ -2023,7 +2023,7 @@ class Societe extends CommonObject
|
||||
if ($idprof==1) $formlength=9;
|
||||
if ($idprof==2) $formlength=14;
|
||||
if ($idprof==3) $formlength=5; // 4 chiffres et 1 lettre depuis janvier
|
||||
if ($idprof==4) $formlength=12;
|
||||
if ($idprof==4) $formlength=32; // No maximum as we need to include a town name in this id
|
||||
}
|
||||
$selected=$preselected;
|
||||
if (! $selected && $idprof==1) $selected=$this->siren;
|
||||
|
||||
@@ -102,7 +102,7 @@ class Translate {
|
||||
}
|
||||
else { // If its a short code xx
|
||||
// Array to convert short lang code into long code.
|
||||
$longforshort=array('ca'=>'ca_ES', 'nb'=>'nb_NO', 'no'=>'nb_NO');
|
||||
$longforshort=array('en'=>'en_US', 'ca'=>'ca_ES', 'nb'=>'nb_NO', 'no'=>'nb_NO');
|
||||
if (isset($longforshort[strtolower($langpart[0])])) $srclang=$longforshort[strtolower($langpart[0])];
|
||||
else $srclang=strtolower($langpart[0])."_".strtoupper($langpart[0]);
|
||||
}
|
||||
|
||||
@@ -222,106 +222,120 @@ if ($_GET["action"] == 'removegroup' && $caneditfield)
|
||||
}
|
||||
}
|
||||
|
||||
if ($_POST["action"] == 'update' && ! $_POST["cancel"] && $caneditfield)
|
||||
if ($_POST["action"] == 'update' && ! $_POST["cancel"])
|
||||
{
|
||||
$message="";
|
||||
|
||||
if (! $_POST["nom"])
|
||||
if ($caneditfield)
|
||||
{
|
||||
$message='<div class="error">'.$langs->trans("NameNotDefined").'</div>';
|
||||
$action="edit"; // Go back to create page
|
||||
}
|
||||
if (! $_POST["login"])
|
||||
{
|
||||
$message='<div class="error">'.$langs->trans("LoginNotDefined").'</div>';
|
||||
$action="edit"; // Go back to create page
|
||||
}
|
||||
$message="";
|
||||
|
||||
if (! $message)
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
$edituser = new User($db, $_GET["id"]);
|
||||
$edituser->fetch();
|
||||
|
||||
$edituser->oldcopy=dol_clone($edituser);
|
||||
|
||||
$edituser->nom = $_POST["nom"];
|
||||
$edituser->prenom = $_POST["prenom"];
|
||||
$edituser->login = $_POST["login"];
|
||||
$edituser->pass = $_POST["password"];
|
||||
$edituser->admin = $_POST["admin"];
|
||||
$edituser->office_phone = $_POST["office_phone"];
|
||||
$edituser->office_fax = $_POST["office_fax"];
|
||||
$edituser->user_mobile = $_POST["user_mobile"];
|
||||
$edituser->email = $_POST["email"];
|
||||
$edituser->webcal_login = $_POST["webcal_login"];
|
||||
$edituser->phenix_login = $_POST["phenix_login"];
|
||||
$edituser->phenix_pass = $_POST["phenix_pass"];
|
||||
$edituser->entity = $_POST["entity"];
|
||||
|
||||
$edituser->photo = $_FILES['photo']['name'];
|
||||
|
||||
$ret=$edituser->update($user);
|
||||
if ($ret < 0)
|
||||
if (! $_POST["nom"])
|
||||
{
|
||||
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||
{
|
||||
$langs->load("errors");
|
||||
$message.='<div class="error">'.$langs->trans("ErrorLoginAlreadyExists",$edituser->login).'</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$message.='<div class="error">'.$edituser->error.'</div>';
|
||||
}
|
||||
$message='<div class="error">'.$langs->trans("NameNotDefined").'</div>';
|
||||
$action="edit"; // Go back to create page
|
||||
}
|
||||
if (! $_POST["login"])
|
||||
{
|
||||
$message='<div class="error">'.$langs->trans("LoginNotDefined").'</div>';
|
||||
$action="edit"; // Go back to create page
|
||||
}
|
||||
|
||||
if ($ret >= 0 && ! sizeof($edituser->errors) && isset($_POST["password"]) && $_POST["password"] !='')
|
||||
if (! $message)
|
||||
{
|
||||
$ret=$edituser->setPassword($user,$_POST["password"]);
|
||||
$db->begin();
|
||||
|
||||
$edituser = new User($db, $_GET["id"]);
|
||||
$edituser->fetch();
|
||||
|
||||
$edituser->oldcopy=dol_clone($edituser);
|
||||
|
||||
$edituser->nom = $_POST["nom"];
|
||||
$edituser->prenom = $_POST["prenom"];
|
||||
$edituser->login = $_POST["login"];
|
||||
$edituser->pass = $_POST["password"];
|
||||
$edituser->admin = $_POST["admin"];
|
||||
$edituser->office_phone = $_POST["office_phone"];
|
||||
$edituser->office_fax = $_POST["office_fax"];
|
||||
$edituser->user_mobile = $_POST["user_mobile"];
|
||||
$edituser->email = $_POST["email"];
|
||||
$edituser->webcal_login = $_POST["webcal_login"];
|
||||
$edituser->phenix_login = $_POST["phenix_login"];
|
||||
$edituser->phenix_pass = $_POST["phenix_pass"];
|
||||
$edituser->entity = $_POST["entity"];
|
||||
|
||||
$edituser->photo = $_FILES['photo']['name'];
|
||||
|
||||
$ret=$edituser->update($user);
|
||||
if ($ret < 0)
|
||||
{
|
||||
$message.='<div class="error">'.$edituser->error.'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($ret >=0 && ! sizeof($edituser->errors))
|
||||
{
|
||||
if (isset($_FILES['photo']['tmp_name']) && trim($_FILES['photo']['tmp_name']))
|
||||
{
|
||||
$dir= $conf->user->dir_output . '/' . get_exdir($edituser->id,2,0,1);
|
||||
|
||||
create_exdir($dir);
|
||||
|
||||
if (@is_dir($dir))
|
||||
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||
{
|
||||
$newfile=$dir.'/'.$_FILES['photo']['name'];
|
||||
if (! dol_move_uploaded_file($_FILES['photo']['tmp_name'],$newfile,1) > 0)
|
||||
{
|
||||
$message .= '<div class="error">'.$langs->trans("ErrorFailedToSaveFile").'</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
// Create small thumbs for company (Ratio is near 16/9)
|
||||
// Used on logon for example
|
||||
$imgThumbSmall = vignette($newfile, $maxwidthsmall, $maxheightsmall, '_small', $quality);
|
||||
$langs->load("errors");
|
||||
$message.='<div class="error">'.$langs->trans("ErrorLoginAlreadyExists",$edituser->login).'</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$message.='<div class="error">'.$edituser->error.'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
// Create mini thumbs for company (Ratio is near 16/9)
|
||||
// Used on menu or for setup page for example
|
||||
$imgThumbMini = vignette($newfile, $maxwidthmini, $maxheightmini, '_mini', $quality);
|
||||
if ($ret >= 0 && ! sizeof($edituser->errors) && isset($_POST["password"]) && $_POST["password"] !='')
|
||||
{
|
||||
$ret=$edituser->setPassword($user,$_POST["password"]);
|
||||
if ($ret < 0)
|
||||
{
|
||||
$message.='<div class="error">'.$edituser->error.'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($ret >=0 && ! sizeof($edituser->errors))
|
||||
{
|
||||
if (isset($_FILES['photo']['tmp_name']) && trim($_FILES['photo']['tmp_name']))
|
||||
{
|
||||
$dir= $conf->user->dir_output . '/' . get_exdir($edituser->id,2,0,1);
|
||||
|
||||
create_exdir($dir);
|
||||
|
||||
if (@is_dir($dir))
|
||||
{
|
||||
$newfile=$dir.'/'.$_FILES['photo']['name'];
|
||||
if (! dol_move_uploaded_file($_FILES['photo']['tmp_name'],$newfile,1) > 0)
|
||||
{
|
||||
$message .= '<div class="error">'.$langs->trans("ErrorFailedToSaveFile").'</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
// Create small thumbs for company (Ratio is near 16/9)
|
||||
// Used on logon for example
|
||||
$imgThumbSmall = vignette($newfile, $maxwidthsmall, $maxheightsmall, '_small', $quality);
|
||||
|
||||
// Create mini thumbs for company (Ratio is near 16/9)
|
||||
// Used on menu or for setup page for example
|
||||
$imgThumbMini = vignette($newfile, $maxwidthmini, $maxheightmini, '_mini', $quality);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($ret >= 0 && ! sizeof($edituser->errors))
|
||||
{
|
||||
$message.='<div class="ok">'.$langs->trans("UserModified").'</div>';
|
||||
$db->commit();
|
||||
if ($ret >= 0 && ! sizeof($edituser->errors))
|
||||
{
|
||||
$message.='<div class="ok">'.$langs->trans("UserModified").'</div>';
|
||||
$db->commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
else if ($caneditpassword) // Case we can edit only password
|
||||
{
|
||||
$edituser = new User($db, $_GET["id"]);
|
||||
$edituser->fetch();
|
||||
|
||||
$ret=$edituser->setPassword($user,$_POST["password"]);
|
||||
if ($ret < 0)
|
||||
{
|
||||
$db->rollback();
|
||||
$message.='<div class="error">'.$edituser->error.'</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,16 +46,16 @@ if ($_REQUEST["id"])
|
||||
$socid=0;
|
||||
if ($user->societe_id > 0) $socid = $user->societe_id;
|
||||
$feature2 = (($socid && $user->rights->user->self->creer)?'':'user');
|
||||
if ($user->id == $_GET["id"]) // A user can always read its own card
|
||||
if ($user->id == $_REQUEST["id"]) // A user can always read its own card
|
||||
{
|
||||
$feature2='';
|
||||
$canreaduser=1;
|
||||
}
|
||||
$result = restrictedArea($user, 'user', $_GET["id"], '', $feature2);
|
||||
$result = restrictedArea($user, 'user', $_REQUEST["id"], '', $feature2);
|
||||
if ($user->id <> $_REQUEST["id"] && ! $canreaduser) accessforbidden();
|
||||
|
||||
|
||||
$id=isset($_GET["id"])?$_GET["id"]:$_POST["id"];
|
||||
$id=! empty($_GET["id"])?$_GET["id"]:$_POST["id"];
|
||||
$dirtop = "../includes/menus/barre_top";
|
||||
$dirleft = "../includes/menus/barre_left";
|
||||
$dirtheme = "../theme";
|
||||
@@ -231,9 +231,9 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($caneditfield || $user->admin) // Si utilisateur <EFBFBD>dit<EFBFBD> = utilisateur courant ayant les droits de cr<63>er ou admin
|
||||
if ($user->id == $fuser->id || $user->admin) // Si utilisateur edite = utilisateur courant (pas besoin de droits particulier car il s'agit d'une page de modif d'output et non de données) ou si admin
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$_GET["id"].'">'.$langs->trans("Modify").'</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$fuser->id.'">'.$langs->trans("Modify").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -197,7 +197,7 @@ if ($modulepart)
|
||||
{
|
||||
$accessallowed=1;
|
||||
}
|
||||
$original_file=$conf->produit->dir_temp.'/'.$original_file;
|
||||
$original_file=(!empty($conf->produit->dir_temp)?$conf->produit->dir_temp:$conf->service->dir_temp).'/'.$original_file;
|
||||
}
|
||||
|
||||
// Wrapping for products or services
|
||||
@@ -208,7 +208,7 @@ if ($modulepart)
|
||||
{
|
||||
$accessallowed=1;
|
||||
}
|
||||
$original_file=$conf->produit->dir_output.'/'.$original_file;
|
||||
$original_file=(!empty($conf->produit->dir_output)?$conf->produit->dir_output:$conf->service->dir_output).'/'.$original_file;
|
||||
}
|
||||
|
||||
// Wrapping for categories
|
||||
|
||||
Reference in New Issue
Block a user