Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2014-08-11 11:31:10 +02:00
commit b713bd7b88
42 changed files with 375 additions and 93 deletions

View File

@ -5,6 +5,7 @@ English Dolibarr ChangeLog
***** ChangeLog for 3.7 compared to 3.6.* *****
For users:
- New: Intervention documents are now available in ECM module.
- New: Can attach supplier order to a customer order.
- New: Supervisor is now visible into user list.
- New: Add user of creation and validation on invoice export.
@ -34,7 +35,9 @@ For users:
Differentiate text and img.
Use label into quick search form.
Use accesskey on form search.
- New: Can add __PROJECT_REF__ and __TIHRPARTY_NAME__ into email topic or content template.
- New: Intervention documents are now available in ECM module
- New: Add attachments on user card + in ECM module
- New: Can add __PROJECT_REF__ and __TIHRPARTY_NAME__ into email topic or content template.
- Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action
- Fix: [ bug #1470, #1472, #1473] User trigger problem
- Fix: [ bug #1489, #1491 ] Intervention trigger problem
@ -56,6 +59,7 @@ For users:
For translators:
- Update language files.
- New: When a translation is not available we always jump to en_US and only en_US.
For developers:
- New: Select list of users can return user into hierarchy.
@ -202,7 +206,9 @@ Fix: [ bug #1528 ] Leopard Services numeration module description is not transla
Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas
Fix: [ bug #1534 ] Unknown error when deleting a product photo under special circumstances
Fix: Update impayees.php
Fix: Fix Link product, In list view and label product
Fix: Link product, In list view and label product
Fix: visible task into area "time" for "My task" must limit task to tasks i am assigned to.
Fix: When disabled, all fields to add time into task line must be disabled.
***** ChangeLog for 3.5.4 compared to 3.5.3 *****
Fix: Hide title of event when agenda module disabled.

View File

@ -108,8 +108,8 @@ Source: "C:\Program Files\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\m
; Mysql data files (does not overwrite if exists)
Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mysql\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db"
; Dolibarr
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,documents\*,includes\ckeditor\_source\*,includes\savant\*,includes\phpmailer\*,jquery\plugins\template\*,PHPExcel\Shared\PDF\*,PHPExcel\Shared\PCLZip\*,tcpdf\fonts\dejavu-fonts-ttf-2.33\*,tcpdf\fonts\freefont-20100919\*,tcpdf\fonts\utils\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\conf.php.sav,*\install.forced.php"
Source: "dev\*.*"; DestDir: "{app}\www\dolibarr\dev"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,dbmodel\*,fpdf\*,initdata\*,iso-normes\*,licence\*,phpcheckstyle\*,phpunit\*,samples\*,test\*,uml\*,xdebug\*"
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,documents\*,nltechno*\*,includes\ckeditor\_source\*,includes\savant\*,includes\phpmailer\*,jquery\plugins\template\*,PHPExcel\Shared\PDF\*,PHPExcel\Shared\PCLZip\*,tcpdf\fonts\dejavu-fonts-ttf-2.33\*,tcpdf\fonts\freefont-20100919\*,tcpdf\fonts\utils\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\conf.php.sav,*\install.forced.php"
Source: "dev\*.*"; DestDir: "{app}\www\dolibarr\dev"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,dbmodel\*,fpdf\*,initdata\*,iso-normes\*,licence\*,phpcheckstyle\*,phpunit\*,samples\*,test\*,uml\*,vagrant\*,xdebug\*"
Source: "doc\*.*"; DestDir: "{app}\www\dolibarr\doc"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,wiki\*,plaquette\*,dev\*,images\dolibarr_screenshot2.png,images\dolibarr_screenshot3.png,images\dolibarr_screenshot4.png,images\dolibarr_screenshot5.png,images\dolibarr_screenshot6.png,images\dolibarr_screenshot7.png,images\dolibarr_screenshot8.png,images\dolibarr_screenshot9.png,images\dolibarr_screenshot10.png,images\dolibarr_screenshot11.png,images\dolibarr_screenshot12.png"
Source: "scripts\*.*"; DestDir: "{app}\www\dolibarr\scripts"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,product\materiel.net.php,product\import-product.php"
Source: "*.*"; DestDir: "{app}\www\dolibarr"; Flags: ignoreversion; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,default.properties,install.lock"

View File

@ -35,7 +35,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -36,7 +36,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -41,7 +41,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
@ -59,6 +59,8 @@ if ($action == 'update')
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", $_POST["MAIN_BUTTON_HIDE_UNAUTHORIZED"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", $_POST["MAIN_DEFAULT_WORKING_DAYS"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", $_POST["MAIN_DEFAULT_WORKING_HOURS"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", $_POST["MAIN_FIRSTNAME_NAME_POSITION"],'chaine',0,'',$conf->entity);
@ -171,13 +173,13 @@ if ($action == 'edit') // Edit
print '<td width="20">&nbsp;</td>';
print '</tr>';
// Taille max des listes
// Max size of lists
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeList").'</td><td><input class="flat" name="main_size_liste_limit" size="4" value="' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '"></td>';
print '<td width="20">&nbsp;</td>';
print '</tr>';
// Desactivation javascript et ajax
// Disable javascript and ajax
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableJavascript").'</td><td>';
print $form->selectyesno('main_disable_javascript',isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0,1);
@ -204,7 +206,23 @@ if ($action == 'edit') // Edit
print '<td width="20">&nbsp;</td>';
print '</tr>';
// Firstname/Name
// DefaultWorkingDays
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultWorkingDays").'</td><td>';
print '<input type="text" name="MAIN_DEFAULT_WORKING_DAYS" size="5" value="'.(isset($conf->global->MAIN_DEFAULT_WORKING_DAYS)?$conf->global->MAIN_DEFAULT_WORKING_DAYS:'1-5').'">';
print '</td>';
print '<td width="20">&nbsp;</td>';
print '</tr>';
// DefaultWorkingHours
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultWorkingHours").'</td><td>';
print '<input type="text" name="MAIN_DEFAULT_WORKING_HOURS" size="5" value="'.(isset($conf->global->MAIN_DEFAULT_WORKING_HOURS)?$conf->global->MAIN_DEFAULT_WORKING_HOURS:'9-18').'">';
print '</td>';
print '<td width="20">&nbsp;</td>';
print '</tr>';
// Firstname/Name
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("FirstnameNamePosition").'</td><td>';
$array=array(0=>$langs->trans("Firstname").' '.$langs->trans("Lastname"),1=>$langs->trans("Lastname").' '.$langs->trans("Firstname"));
@ -360,6 +378,22 @@ else // Show
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("WeekStartOnDay").'</td><td>';
print $langs->trans("Day".(isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1'));
print '</td>';
print '<td width="20">&nbsp;</td>';
print '</tr>';
// DefaultWorkingDays
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultWorkingDays").'</td><td>';
print isset($conf->global->MAIN_DEFAULT_WORKING_DAYS)?$conf->global->MAIN_DEFAULT_WORKING_DAYS:'1-5';
print '</td>';
print '<td width="20">&nbsp;</td>';
print '</tr>';
// DefaultWorkingHours
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultWorkingHours").'</td><td>';
print isset($conf->global->MAIN_DEFAULT_WORKING_HOURS)?$conf->global->MAIN_DEFAULT_WORKING_HOURS:'9-18';
print '</td>';
print '<td width="20">&nbsp;</td>';
print '</tr>';

View File

@ -42,7 +42,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -43,7 +43,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -44,7 +44,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -42,7 +42,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -35,7 +35,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -148,7 +148,7 @@ if ($action == 'add' || $action == 'update')
{
$reload = 0;
setEventMessage($object->error, 'errors');
$actino= "edit";
$action= "edit";
}
}

View File

@ -36,7 +36,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -43,7 +43,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -3564,7 +3564,7 @@ if ($action == 'create')
// Linked object block
$somethingshown = $object->showLinkedObjectBlock();
if (empty($somethingshown) && ! empty($conf->commande->enabled))
if (empty($somethingshown) && ! empty($conf->commande->enabled))
{
print '<br><a href="#" id="linktoorder">' . $langs->trans('LinkedOrder') . '</a>';

View File

@ -37,7 +37,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -38,7 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -39,7 +39,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -153,7 +153,7 @@ if ($type == 'directory')
$sorting = (strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC);
// Right area. If module is defined, we are in automatic ecm.
$automodules = array('company', 'invoice', 'invoice_supplier', 'propal', 'order', 'order_supplier', 'contract', 'product', 'tax', 'project');
$automodules = array('company', 'invoice', 'invoice_supplier', 'propal', 'order', 'order_supplier', 'contract', 'product', 'tax', 'project', 'fichinter', 'user');
// TODO change for multicompany sharing
// Auto area for suppliers invoices
@ -184,6 +184,10 @@ if ($type == 'directory')
else if ($module == 'tax') $upload_dir = $conf->tax->dir_output;
// Auto area for projects
else if ($module == 'project') $upload_dir = $conf->projet->dir_output;
// Auto area for interventions
else if ($module == 'fichinter') $upload_dir = $conf->ficheinter->dir_output;
// Auto area for users
else if ($module == 'user') $upload_dir = $conf->user->dir_output;
if (in_array($module, $automodules))
{

View File

@ -2955,7 +2955,7 @@ class Form
* Show a form to select a project
*
* @param int $page Page
* @param int $socid Id third party
* @param int $socid Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id)
* @param int $selected Id pre-selected project
* @param string $htmlname Name of select field
* @return void

View File

@ -936,6 +936,16 @@ class FormFile
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
$object_instance=new Project($this->db);
}
else if ($modulepart == 'fichinter')
{
include_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
$object_instance=new Fichinter($this->db);
}
else if ($modulepart == 'user')
{
include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
$object_instance=new User($this->db);
}
$var=true;
foreach($filearray as $key => $file)
@ -962,7 +972,9 @@ class FormFile
if ($modulepart == 'contract') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:''); }
if ($modulepart == 'product') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:''); }
if ($modulepart == 'tax') { preg_match('/(\d+)\/[^\/]+$/',$relativefile,$reg); $id=(isset($reg[1])?$reg[1]:''); }
if ($modulepart == 'project') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:'');}
if ($modulepart == 'project') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:'');}
if ($modulepart == 'fichinter') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:'');}
if ($modulepart == 'user') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $id=(isset($reg[1])?$reg[1]:'');}
if (! $id && ! $ref) continue;

View File

@ -154,7 +154,7 @@ class Translate
* If $domain is "file@module" instead of "file" then we look for module lang file
* in htdocs/custom/modules/mymodule/langs/code_CODE/file.lang
* then in htdocs/module/langs/code_CODE/file.lang instead of htdocs/langs/code_CODE/file.lang
* @param string $alt 0 (try xx_ZZ then 1), 1 (try xx_XX then 2), 2 (try en_US or fr_FR or es_ES)
* @param string $alt 0 (try xx_ZZ then 1), 1 (try xx_XX then 2), 2 (try en_US)
* @param int $stopafterdirection Stop when the DIRECTION tag is found (optimize speed)
* @param int $forcelangdir To force a different lang directory
* @return int <0 if KO, 0 if already loaded or loading not required, >0 if OK
@ -196,7 +196,7 @@ class Translate
// Redefine alt
$langarray=explode('_',$langofdir);
if ($alt < 1 && isset($langarray[1]) && strtolower($langarray[0]) == strtolower($langarray[1])) $alt=1;
if ($alt < 2 && (strtolower($langofdir) == 'en_us' || strtolower($langofdir) == 'fr_fr' || strtolower($langofdir) == 'es_es')) $alt=2;
if ($alt < 2 && strtolower($langofdir) == 'en_us') $alt=2;
foreach($this->dir as $keydir => $searchdir)
{
@ -312,8 +312,8 @@ class Translate
// This function MUST NOT contains call to syslog
//dol_syslog("Translate::Load loading alternate translation file (to complete ".$this->defaultlang."/".$newdomain.".lang file)", LOG_DEBUG);
$langofdir='en_US';
if (preg_match('/^fr/i',$langarray[0])) $langofdir='fr_FR';
if (preg_match('/^es/i',$langarray[0])) $langofdir='es_ES';
//if (preg_match('/^fr/i',$langarray[0])) $langofdir='fr_FR';
//if (preg_match('/^es/i',$langarray[0])) $langofdir='es_ES';
$this->load($domain,$alt+1,$stopafterdirection,$langofdir);
}
@ -592,7 +592,7 @@ class Translate
{
// Test si fichier dans repertoire de la langue alternative
if ($this->defaultlang != "en_US") $filenamealt = $searchdir."/langs/en_US/".$filename;
else $filenamealt = $searchdir."/langs/fr_FR/".$filename;
//else $filenamealt = $searchdir."/langs/fr_FR/".$filename;
if (is_readable(dol_osencode($filenamealt))) return true;
}
}

View File

@ -1582,6 +1582,16 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
$original_file=$conf->projet->dir_output.'/'.$original_file;
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."projet WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity;
}
// Wrapping for interventions
else if ($modulepart == 'fichinter')
{
if ($fuser->rights->ficheinter->lire || preg_match('/^specimen/i',$original_file))
{
$accessallowed=1;
}
$original_file=$conf->ficheinter->dir_output.'/'.$original_file;
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity;
}
// Wrapping pour les commandes fournisseurs
else if ($modulepart == 'commande_fournisseur' || $modulepart == 'order_supplier')

View File

@ -221,7 +221,12 @@ function GETPOST($paramname,$check='',$method=0)
*/
function dol_getprefix()
{
if (isset($_SERVER["SERVER_NAME"]) && isset($_SERVER["DOCUMENT_ROOT"])) return dol_hash($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].DOL_DOCUMENT_ROOT.DOL_URL_ROOT);
if (isset($_SERVER["SERVER_NAME"]) && isset($_SERVER["DOCUMENT_ROOT"]))
{
return dol_hash($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].DOL_DOCUMENT_ROOT.DOL_URL_ROOT);
// Use this for a "clear" cookie name
//return dol_sanitizeFileName($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].DOL_DOCUMENT_ROOT.DOL_URL_ROOT);
}
else return dol_hash(DOL_DOCUMENT_ROOT.DOL_URL_ROOT);
}

View File

@ -480,7 +480,7 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
if (empty($mine) || ! empty($tasksrole[$lines[$i]->id]))
{
print "<tr ".$bc[$var].">\n";
// Project
print "<td>";
$projectstatic->id=$lines[$i]->fk_project;
@ -489,14 +489,14 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
$projectstatic->label=$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project];
print $projectstatic->getNomUrl(1);
print "</td>";
// Ref
print '<td>';
$taskstatic->id=$lines[$i]->id;
$taskstatic->ref=$lines[$i]->id;
print $taskstatic->getNomUrl(1);
print '</td>';
// Label task
print "<td>";
for ($k = 0 ; $k < $level ; $k++)
@ -507,28 +507,28 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
$taskstatic->ref=$lines[$i]->label;
print $taskstatic->getNomUrl(0);
print "</td>\n";
// Date start
print '<td align="center">';
print dol_print_date($lines[$i]->date_start,'dayhour');
print '</td>';
// Date end
print '<td align="center">';
print dol_print_date($lines[$i]->date_end,'dayhour');
print '</td>';
// Planned Workload
print '<td align="right">';
if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload,'allhourmin');
else print '--:--';
print '</td>';
// Progress declared %
print '<td align="right">';
print $lines[$i]->progress.' %';
print '</td>';
// Time spent
print '<td align="right">';
if ($lines[$i]->duration)
@ -539,7 +539,7 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
}
else print '--:--';
print "</td>\n";
$disabledproject=1;$disabledtask=1;
//print "x".$lines[$i]->fk_project;
//var_dump($lines[$i]);
@ -555,7 +555,7 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
{
$disabledtask=1;
}
print '<td class="nowrap">';
$s =$form->select_date('',$lines[$i]->id,'','','',"addtime",1,0,1,$disabledtask);
$s.='&nbsp;&nbsp;&nbsp;';
@ -567,10 +567,10 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("YouAreNotContactOfProject"));
else if ($disabledtask) print $form->textwithpicto('',$langs->trans("TaskIsNotAffectedToYou"));
print '</td>';
print "</tr>\n";
}
$inc++;
$level++;
if ($lines[$i]->id) projectLinesb($inc, $lines[$i]->id, $lines, $level, $projectsrole, $tasksrole, $mine, $restricteditformytask);

View File

@ -88,10 +88,24 @@ function user_prepare_head($object)
//Info on users is visible only by internal user
if (empty($user->societe_id))
{
$head[$h][0] = DOL_URL_ROOT.'/user/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Note");
$head[$h][2] = 'note';
$h++;
// Notes
$nbNote = 0;
if(!empty($object->note)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/user/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Note");
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
$head[$h][2] = 'note';
$h++;
// Attached files
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$upload_dir = $conf->user->dir_output . "/" . $object->id;
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
$head[$h][0] = DOL_URL_ROOT.'/user/document.php?userid='.$object->id;
$head[$h][1] = $langs->trans("Documents");
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
$head[$h][2] = 'document';
$h++;
$head[$h][0] = DOL_URL_ROOT.'/user/info.php?id='.$object->id;
$head[$h][1] = $langs->trans("Info");

View File

@ -409,6 +409,9 @@ if (! empty($conf->global->ECM_AUTO_TREE_ENABLED))
if (! empty($conf->fournisseur->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'invoice_supplier', 'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersInvoices"), 'desc'=>$langs->trans("ECMDocsByInvoices")); }
if (! empty($conf->tax->enabled)) { $langs->load("compta"); $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'tax', 'test'=>$conf->tax->enabled, 'label'=>$langs->trans("SocialContributions"), 'desc'=>$langs->trans("ECMDocsBySocialContributions")); }
if (! empty($conf->projet->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'project', 'test'=>$conf->projet->enabled, 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsByProjects")); }
if (! empty($conf->ficheinter->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'fichinter', 'test'=>$conf->ficheinter->enabled, 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsByInterventions")); }
$rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'user', 'test'=>1, 'label'=>$langs->trans("Users"), 'desc'=>$langs->trans("ECMDocsByUsers"));
}
print_fiche_titre($langs->trans("ECMArea").' - '.$langs->trans("ECMFileManager"));

View File

@ -39,7 +39,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -1337,18 +1337,8 @@ if ($action == 'create')
$form->select_comptes($fk_account, 'fk_account', 0, '', 1);
print '</td></tr>';
// Project
if (! empty($conf->projet->enabled))
{
$formproject=new FormProjets($db);
$langs->load('projects');
print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">';
$formproject->select_projects(-1, $projectid, 'projectid');
print '</td></tr>';
}
print '<tr><td>'.$langs->trans('NotePublic').'</td>';
// Public note
print '<tr><td>'.$langs->trans('NotePublic').'</td>';
print '<td>';
$doleditor = new DolEditor('note_public', GETPOST('note_public'), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
print $doleditor->Create(1);
@ -1869,11 +1859,11 @@ else
print '</td><td colspan="3">';
if ($action == 'classify')
{
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id,$object->socid,$object->fk_project,'projectid');
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$object->socid:'-1', $object->fk_project, 'projectid');
}
else
{
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id,$object->socid,$object->fk_project,'none');
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none');
}
print '</td>';
print '</tr>';
@ -2253,19 +2243,19 @@ else
});
</script>
';
print '<div id="commande" style="display:none">';
$sql = "SELECT s.rowid as socid, s.nom as name, s.client, c.rowid, c.ref, c.ref_supplier, c.total_ht";
$sql .= " FROM " . MAIN_DB_PREFIX . "societe as s";
$sql .= ", " . MAIN_DB_PREFIX . "commande_fournisseur as c";
$sql .= ' WHERE c.fk_soc = s.rowid AND c.fk_soc = ' . $societe->id;
$resqlorderlist = $db->query($sql);
if ($resqlorderlist) {
$num = $db->num_rows($resqlorderlist);
$i = 0;
print '<form action="" method="POST" name="LinkedOrder">';
print '<table class="noborder">';
print '<tr class="liste_titre">';
@ -2289,7 +2279,7 @@ else
print '</td>';
print '</tr>';
}
$i ++;
}
print '</table>';
@ -2299,10 +2289,10 @@ else
} else {
dol_print_error($db);
}
print '</div>';
}
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
//print '</td><td valign="top" width="50%">';
//print '<br>';

View File

@ -75,7 +75,8 @@ AgendaShowBirthdayEvents=Show birthday's contacts
AgendaHideBirthdayEvents=Hide birthday's contacts
Busy=Busy
ExportDataset_event1=List of agenda events
DefaultWorkingDays=Default working days range in week (Example: 1-5, 1-6)
DefaultWorkingHours=Default working hours in day (Example: 9-18)
# External Sites ical
ExportCal=Export calendar
ExtSites=Import external calendars

View File

@ -37,7 +37,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -195,7 +195,7 @@ print '<td>'.$langs->trans("ActivityOnProjectThisWeek").'</td>';
print '<td align="right">'.$langs->trans("Time").'</td>';
print "</tr>\n";
$sql = "SELECT p.rowid, p.ref, p.title, sum(tt.task_duration) as nb";
$sql = "SELECT p.rowid, p.ref, p.title, SUM(tt.task_duration) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql.= " , ".MAIN_DB_PREFIX."projet_task as t";
$sql.= " , ".MAIN_DB_PREFIX."projet_task_time as tt";
@ -248,7 +248,7 @@ print '<td>'.$langs->trans("ActivityOnProjectThisMonth").': '.dol_print_date($no
print '<td align="right">'.$langs->trans("Time").'</td>';
print "</tr>\n";
$sql = "SELECT p.rowid, p.ref, p.title, sum(tt.task_duration) as nb";
$sql = "SELECT p.rowid, p.ref, p.title, SUM(tt.task_duration) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql.= ", ".MAIN_DB_PREFIX."projet_task as t";
$sql.= ", ".MAIN_DB_PREFIX."projet_task_time as tt";
@ -283,6 +283,10 @@ else
{
dol_print_error($db);
}
print '<tr class="liste_total">';
print '<td>'.$langs->trans('Total').'</td>';
print '<td align="right">'.convertSecondToTime($total).'</td>';
print "</tr>\n";
print "</table>";
/* Affichage de la liste des projets de l'annee */
@ -292,7 +296,7 @@ print '<td>'.$langs->trans("ActivityOnProjectThisYear").': '.strftime("%Y", $now
print '<td align="right">'.$langs->trans("Time").'</td>';
print "</tr>\n";
$sql = "SELECT p.rowid, p.ref, p.title, sum(tt.task_duration) as nb";
$sql = "SELECT p.rowid, p.ref, p.title, SUM(tt.task_duration) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql.= ", ".MAIN_DB_PREFIX."projet_task as t";
$sql.= ", ".MAIN_DB_PREFIX."projet_task_time as tt";
@ -326,6 +330,10 @@ else
{
dol_print_error($db);
}
print '<tr class="liste_total">';
print '<td>'.$langs->trans('Total').'</td>';
print '<td align="right">'.convertSecondToTime($total).'</td>';
print "</tr>\n";
print "</table>";

View File

@ -70,7 +70,7 @@ if ($action == 'addtime' && $user->rights->projet->creer)
{
// We store HOURS in seconds
if($matches[2]=='hour') $timespent_duration[$id] += $time*60*60;
// We store MINUTES in seconds
if($matches[2]=='min') $timespent_duration[$id] += $time*60;
}
@ -88,9 +88,9 @@ if ($action == 'addtime' && $user->rights->projet->creer)
$task->timespent_date = dol_mktime(12,0,0,$_POST["{$key}month"],$_POST["{$key}day"],$_POST["{$key}year"]);
$task->addTimeSpent($user);
}
setEventMessage($langs->trans("RecordSaved"));
// Redirect to avoid submit twice on back
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$projectid.($mode?'&mode='.$mode:''));
exit;
@ -101,6 +101,8 @@ if ($action == 'addtime' && $user->rights->projet->creer)
}
}
/*
* View
*/
@ -113,7 +115,6 @@ $taskstatic = new Task($db);
$title=$langs->trans("TimeSpent");
if ($mine) $title=$langs->trans("MyTimeSpent");
//$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1);
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1); // Return all project i have permission on. I want my tasks and some of my task may be on a public projet that is not my project
@ -132,6 +133,25 @@ llxHeader("",$title,"");
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num);
// Show description of content
if ($mine) print $langs->trans("MyTasksDesc").'<br><br>';
else
{
if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("ProjectsDesc").'<br><br>';
else print $langs->trans("ProjectsPublicTakDesc").'<br><br>';
}
// Filter on user
/* dol_fiche_head('');
print '<table class="border" width="100%"><tr><td width="25%">'.$langs->trans("User").'</td>';
print '<td>';
if ($mine) print $user->getLoginUrl(1);
print '</td>';
print '</tr></table>';
dol_fiche_end();
*/
// Filter on user
/* dol_fiche_head('');
print '<table class="border" width="100%"><tr><td width="25%">'.$langs->trans("User").'</td>';
@ -161,7 +181,7 @@ print '<td colspan="2">'.$langs->trans("AddDuration").'</td>';
print "</tr>\n";
// By default, we can edit only tasks we are assigned to
$restricteditformytask=(empty($conf->global->PROJECT_TIME_ON_ALL_TASKS_MY_PROJECTS)?1:0);
$restricteditformytask=(empty($conf->global->PROJECT_TIME_ON_ALL_TASKS_MY_PROJECTS)?1:0);
if (count($tasksarray) > 0)
{

View File

@ -36,7 +36,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -36,7 +36,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -201,9 +201,9 @@ class Project extends CommonObject
$sql.= ", fk_soc = " . ($this->socid > 0 ? $this->socid : "null");
$sql.= ", fk_statut = " . $this->statut;
$sql.= ", public = " . ($this->public ? 1 : 0);
$sql.= ", datec=" . ($this->date_c != '' ? $this->db->idate($this->date_c) : 'null');
$sql.= ", dateo=" . ($this->date_start != '' ? $this->db->idate($this->date_start) : 'null');
$sql.= ", datee=" . ($this->date_end != '' ? $this->db->idate($this->date_end) : 'null');
$sql.= ", datec=" . ($this->date_c != '' ? "'".$this->db->idate($this->date_c)."'" : 'null');
$sql.= ", dateo=" . ($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : 'null');
$sql.= ", datee=" . ($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null');
$sql.= " WHERE rowid = " . $this->id;
dol_syslog(get_class($this)."::Update", LOG_DEBUG);
@ -263,7 +263,9 @@ class Project extends CommonObject
else
{
$this->error = $this->db->lasterror();
$this->errors[] = $this->error;
$this->db->rollback();
dol_syslog(get_class($this)."::Update error -2 " . $this->error, LOG_ERR);
$result = -2;
}
}
@ -496,10 +498,9 @@ class Project extends CommonObject
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "projet_extrafields";
$sql.= " WHERE fk_object=" . $this->id;
dol_syslog(get_class($this) . "::delete", LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql)
if (! $resql)
{
$this->errors[] = $this->db->lasterror();
$error++;

View File

@ -222,13 +222,13 @@ foreach ($listofreferent as $key => $value)
$classname=$value['class'];
$tablename=$value['table'];
$qualified=$value['test'];
if ($qualified)
{
print '<br>';
print_titre($langs->trans($title));
$selectList=$formproject->select_element($tablename,$project->societe->id);
if (!$selectList || ($selectList<0)) {

View File

@ -75,7 +75,7 @@ if ($id)
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num);
// Show description of content
if ($mine) print $langs->trans("MyProjectsDesc").'<br><br>';
if ($mine) print $langs->trans("MyTasksDesc").'<br><br>';
else
{
if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("ProjectsDesc").'<br><br>';

View File

@ -35,7 +35,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -36,7 +36,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

View File

@ -35,7 +35,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);

174
htdocs/user/document.php Normal file
View File

@ -0,0 +1,174 @@
<?php
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/user/document.php
* \brief Tab for documents linked to user
* \ingroup user
*/
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
$langs->load("users");
$langs->load('other');
$action=GETPOST('action');
$confirm=GETPOST('confirm');
$id=(GETPOST('userid','int') ? GETPOST('userid','int') : GETPOST('id','int'));
$ref = GETPOST('ref', 'alpha');
// Define value to know what current user can do on users
$canadduser=(! empty($user->admin) || $user->rights->user->user->creer);
$canreaduser=(! empty($user->admin) || $user->rights->user->user->lire);
$canedituser=(! empty($user->admin) || $user->rights->user->user->creer);
$candisableuser=(! empty($user->admin) || $user->rights->user->user->supprimer);
$canreadgroup=$canreaduser;
$caneditgroup=$canedituser;
if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS))
{
$canreadgroup=(! empty($user->admin) || $user->rights->user->group_advance->read);
$caneditgroup=(! empty($user->admin) || $user->rights->user->group_advance->write);
}
// Define value to know what current user can do on properties of edited user
if ($id)
{
// $user est le user qui edite, $id est l'id de l'utilisateur edite
$caneditfield=((($user->id == $id) && $user->rights->user->self->creer)
|| (($user->id != $id) && $user->rights->user->user->creer));
$caneditpassword=((($user->id == $id) && $user->rights->user->self->password)
|| (($user->id != $id) && $user->rights->user->user->password));
}
// Security check
$socid=0;
if ($user->societe_id > 0) $socid = $user->societe_id;
$feature2='user';
if ($user->id == $id) { $feature2=''; $canreaduser=1; } // A user can always read its own card
if (!$canreaduser) {
$result = restrictedArea($user, 'user', $id, '&user', $feature2);
}
if ($user->id <> $id && ! $canreaduser) accessforbidden();
// Get parameters
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0; }
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="name";
$object = new User($db);
if ($id > 0 || ! empty($ref))
{
$result = $object->fetch($id, $ref);
$upload_dir = $conf->user->multidir_output[$object->entity] . "/" . $object->id ;
}
/*
* Actions
*/
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php';
/*
* View
*/
$form = new Form($db);
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
llxHeader('',$langs->trans("ThirdParty").' - '.$langs->trans("Files"),$help_url);
if ($object->id)
{
/*
* Affichage onglets
*/
if (! empty($conf->notification->enabled)) $langs->load("mails");
$head = user_prepare_head($object);
$form=new Form($db);
dol_fiche_head($head, 'document', $langs->trans("User"),0,'user');
// Construit liste des fichiers
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
$totalsize=0;
foreach($filearray as $key => $file)
{
$totalsize+=$file['size'];
}
print '<table class="border"width="100%">';
// Reference
print '<tr><td width="20%">'.$langs->trans('Ref').'</td>';
print '<td colspan="3">';
print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin);
print '</td>';
print '</tr>';
// Lastname
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="3">'.$object->lastname.'&nbsp;</td>';
print '</tr>';
// Firstname
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$object->firstname.'&nbsp;</td></tr>';
// Login
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur" colspan="3">'.$object->login.'&nbsp;</td></tr>';
// Nbre fichiers
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
//Total taille
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
print '</table>';
print '</div>';
$modulepart = 'societe';
$permission = $user->rights->societe->creer;
$param = '&id=' . $object->id;
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
}
else
{
accessforbidden('',0,0);
}
llxFooter();
$db->close();