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

Conflicts:
	htdocs/expensereport/card.php
This commit is contained in:
Laurent Destailleur 2017-01-27 01:26:11 +01:00
commit 70091eceed
25 changed files with 232 additions and 201 deletions

View File

@ -174,7 +174,7 @@ then
echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
else
echo Detection of documents directory $documentdir failed so demo files were not copied.
echo Detection of documents directory from $mydir failed so demo files were not copied.
fi

View File

@ -194,7 +194,7 @@ if ($id > 0 && ! preg_match('/^add/i',$action))
* Fact bookmark mode or visually edition
*/
$object->fetch($id);
$hselected = 'card';
$head = array(
array(
@ -216,10 +216,10 @@ if ($id > 0 && ! preg_match('/^add/i',$action))
dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark');
$linkback = '<a href="'.DOL_URL_ROOT.'/bookmarks/list.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '', '', 0, '', '', 0);
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '', '', 0, '', '', 0);
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
@ -307,7 +307,7 @@ if ($id > 0 && ! preg_match('/^add/i',$action))
// Buttons
print "<div class=\"tabsAction\">\n";
// Edit

View File

@ -983,7 +983,7 @@ if ($action == 'create')
$projectid = GETPOST('projectid')?GETPOST('projectid'):$object->fk_project;
$langs->load('projects');
print '<tr><td>' . $langs->trans('Project') . '</td><td>';
$numprojet = $formproject->select_projects($socid, $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, $forceaddid=0, $morecss='');
$numprojet = $formproject->select_projects($object->thirdparty->id, $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, '');
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $object->thirdparty->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$object->thirdparty->id.(!empty($id)?'&id='.$id:'')).'">' . $langs->trans("AddProject") . '</a>';
print '</td></tr>';
}

View File

@ -45,6 +45,18 @@ $page = GETPOST('page','int');
$sortorder = GETPOST('sortorder','alpha');
$sortfield = GETPOST('sortfield','alpha');
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0; }
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (! $sortorder) $sortorder="DESC";
if (! $sortfield) $sortfield="f.facnumber";
/*
* View
*/
@ -54,17 +66,7 @@ llxHeader();
$thirdpartystatic=new Societe($db);
$invoicestatic=new Facture($db);
if ($page == -1) $page = 0 ;
$offset = $conf->liste_limit * $page ;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (! $sortorder) $sortorder="DESC";
if (! $sortfield) $sortfield="f.facnumber";
/*
* Liste de demandes
*/
// List of requests
$sql= "SELECT f.facnumber, f.rowid, f.total_ttc,";
$sql.= " s.nom as name, s.rowid as socid,";
@ -83,10 +85,10 @@ if ($statut) $sql.= " AND pfd.traite = ".$statut;
$sql.= " AND pfd.fk_facture = f.rowid";
if (dol_strlen(trim(GETPOST('search_societe','alpha'))))
{
$sql.= " AND s.nom LIKE '%".GETPOST('search_societe','alpha')."%'";
$sql.= natural_search("s.nom", 'search_societe');
}
$sql.= " ORDER BY $sortfield $sortorder ";
$sql.= $db->plimit($conf->liste_limit+1, $offset);
$sql.= $db->plimit($limit+1, $offset);
$resql=$db->query($sql);
if ($resql)
@ -103,26 +105,35 @@ if ($resql)
print_barre_liste($langs->trans("RequestStandingOrderTreated"), $page, "demandes.php", $urladd, $sortfield, $sortorder, '', $num);
}
print '<form action="'.$_SERVER["PHP_SELF"].'" method="GET">';
print '<table class="liste" width="100%">';
print '<tr class="liste_titre">';
print '<td class="liste_titre">'.$langs->trans("Bill").'</td><td class="liste_titre">'.$langs->trans("Company").'</td>';
print '<td class="liste_titre" align="right">'.$langs->trans("Amount").'</td>';
print '<td class="liste_titre" align="right">'.$langs->trans("DateRequest").'</td>';
print_liste_field_titre($langs->trans("Bill"));
print_liste_field_titre($langs->trans("Company"));
print_liste_field_titre($langs->trans("Amount"));
print_liste_field_titre($langs->trans("DateRequest"));
print_liste_field_titre('');
print '</tr>';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="GET">';
print '<tr class="liste_titre">';
print '<td class="liste_titre"><input type="text" class="flat" name="search_facture" size="12" value="'.dol_escape_htmltag(GETPOST('search_facture','alpha')).'"></td>';
print '<td class="liste_titre"><input type="text" class="flat" name="search_societe" size="18" value="'.dol_escape_htmltag(GETPOST('search_societe','alpha')).'"></td>';
print '<td colspan="2" class="liste_titre" align="right"><input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
// Action column
print '<td class="liste_titre" align="middle">';
$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
print $searchpitco;
print '</td>';
print '</tr>';
print '</form>';
$var = True;
$users = array();
while ($i < min($num,$conf->liste_limit))
while ($i < min($num,$limit))
{
$obj = $db->fetch_object($resql);
$var=!$var;
@ -145,12 +156,15 @@ if ($resql)
print '<td align="right">'.dol_print_date($db->jdate($obj->date_demande),'day').'</td>';
print '<td align="right"></td>';
print '</tr>';
$i++;
}
print "</table><br>";
print '</form>';
}
else
{

View File

@ -77,7 +77,7 @@ $userid=GETPOST('userid','int');
$begin=GETPOST('begin');
if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="p.lastname";
if ($page < 0) { $page = 0; }
if (empty($page) || $page < 0) { $page = 0; }
$offset = $limit * $page;
$langs->load("companies");
@ -147,7 +147,7 @@ $arrayfields=array(
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
foreach($extrafields->attribute_label as $key => $val)
{
$arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>$extrafields->attribute_list[$key], 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>$extrafields->attribute_perms[$key]);
}
@ -176,7 +176,7 @@ if (empty($reshook))
{
// Selection of new fields
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
// Purge search criteria
if (GETPOST('button_removefilter_x') || GETPOST('button_removefilter.x') || GETPOST('button_removefilter')) // All tests are required to be compatible with all browsers
{
@ -200,7 +200,7 @@ if (empty($reshook))
$search_categ_supplier='';
$search_array_options=array();
}
// Mass actions
$objectclass='Contact';
$objectlabel='Contact';
@ -345,7 +345,7 @@ foreach ($search_array_options as $key => $val)
$typ=$extrafields->attribute_type[$tmpkey];
$mode=0;
if (in_array($typ, array('int','double'))) $mode=1; // Search on a numeric
if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit)))
if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit)))
{
$sql .= natural_search('ef.'.$tmpkey, $crit, $mode);
}
@ -424,7 +424,7 @@ foreach ($search_array_options as $key => $val)
$crit=$val;
$tmpkey=preg_replace('/search_options_/','',$key);
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
}
}
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
@ -504,9 +504,9 @@ if (! empty($arrayfields['p.priv']['checked'])) print_liste_field_tit
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
foreach($extrafields->attribute_label as $key => $val)
{
if (! empty($arrayfields["ef.".$key]['checked']))
if (! empty($arrayfields["ef.".$key]['checked']))
{
$align=$extrafields->getAlignFlag($key);
print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder);
@ -555,13 +555,13 @@ if (! empty($arrayfields['p.town']['checked']))
print '<input class="flat" type="text" name="search_town" size="5" value="'.dol_escape_htmltag($search_town).'">';
print '</td>';
}
if (! empty($arrayfields['p.phone']['checked']))
if (! empty($arrayfields['p.phone']['checked']))
{
print '<td class="liste_titre">';
print '<input class="flat" type="text" name="search_phone_pro" size="6" value="'.dol_escape_htmltag($search_phone_pro).'">';
print '</td>';
}
if (! empty($arrayfields['p.phone_perso']['checked']))
if (! empty($arrayfields['p.phone_perso']['checked']))
{
print '<td class="liste_titre">';
print '<input class="flat" type="text" name="search_phone_perso" size="6" value="'.dol_escape_htmltag($search_phone_perso).'">';
@ -607,9 +607,9 @@ if (! empty($arrayfields['p.priv']['checked']))
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
foreach($extrafields->attribute_label as $key => $val)
{
if (! empty($arrayfields["ef.".$key]['checked']))
if (! empty($arrayfields["ef.".$key]['checked']))
{
print '<td class="liste_titre">';
print '</td>';
@ -664,7 +664,7 @@ while ($i < min($num,$limit))
$contactstatic->phone_mobile=$obj->phone_mobile;
$contactstatic->zip=$obj->zip;
$contactstatic->town=$obj->town;
// Name
if (! empty($arrayfields['p.lastname']['checked']))
{
@ -746,9 +746,9 @@ while ($i < min($num,$limit))
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
foreach($extrafields->attribute_label as $key => $val)
{
if (! empty($arrayfields["ef.".$key]['checked']))
if (! empty($arrayfields["ef.".$key]['checked']))
{
print '<td';
$align=$extrafields->getAlignFlag($key);

View File

@ -8,7 +8,7 @@
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015-2016 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2015-2017 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -2251,11 +2251,11 @@ class Contrat extends CommonObject
$this->context['createfromclone'] = 'createfromclone';
$error = 0;
$now = dol_now();
$this->fetch($this->id);
// Load dest object
$clonedObj = clone $this;
$clonedObj->socid = $socid;
$this->db->begin();
@ -2290,16 +2290,13 @@ class Contrat extends CommonObject
$this->error = $clonedObj->error;
$this->errors[] = $clonedObj->error;
} else {
// copy internal contacts
if ($clonedObj->copy_linked_contact($this, 'internal') < 0)
$error ++;
// copy external contacts if same company
elseif ($this->socid == $clonedObj->socid) {
if ($clonedObj->copy_linked_contact($this, 'external') < 0)
$error ++;
}
}
// copy external contacts if same company
if ($this->socid == $clonedObj->socid) {
if ($clonedObj->copy_linked_contact($this, 'external') < 0) {
$error++;
}
}
}
if (! $error) {
foreach ( $this->lines as $line ) {

View File

@ -272,7 +272,7 @@ $sql.= " state.code_departement, state.nom";
// Add where from extra fields
foreach ($extrafields->attribute_label as $key => $val)
{
$sql .= ', ef.'.$val;
$sql .= ', ef.'.$key;
}
// Add where from hooks
$parameters=array();

View File

@ -669,7 +669,7 @@ class FormFile
// Show file name with link to download
$out.= '<td class="nowrap">';
$out.= '<a data-ajax="false" href="'.$documenturl.'?modulepart='.$modulepart.'&amp;file='.urlencode($relativepath).'"';
$out.= '<a data-ajax="false" href="'.$documenturl.'?modulepart='.$modulepart.'&amp;file='.urlencode($relativepath).($param?'&'.$param:'').'"';
$mime=dol_mimetype($relativepath,'',0);
if (preg_match('/text/',$mime)) $out.= ' target="_blank"';
$out.= ' target="_blank">';

View File

@ -6,6 +6,7 @@
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -1285,10 +1286,12 @@ class pdf_einstein extends ModelePDFCommandes
$arrayidcontact=$object->getIdContact('internal','SALESREPFOLL');
if (count($arrayidcontact) > 0)
{
$usertmp=new User($this->db);
$usertmp=new User($this->db);
$usertmp->fetch($arrayidcontact[0]);
$posy+=4;
$pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(190, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R');
$pdf->MultiCell(100, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R');
}
}

View File

@ -7,6 +7,7 @@
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -1620,8 +1621,10 @@ class pdf_crabe extends ModelePDFFactures
{
$usertmp=new User($this->db);
$usertmp->fetch($arrayidcontact[0]);
$posy+=4;
$pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(190, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R');
$pdf->MultiCell($w, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R');
}
}

View File

@ -252,7 +252,7 @@ class mod_codeproduct_elephant extends ModeleProductCode
// Get Mask value
$mask = '';
if ($type==0) $mask = empty($conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT)?'':$conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT;
if ($type==1) $mask = empty($conf->global->PRODUCT_ELEPHANT_MASK_SSERVICE)?'':$conf->global->PRODUCT_ELEPHANT_MASK_SERVICE;
if ($type==1) $mask = empty($conf->global->PRODUCT_ELEPHANT_MASK_SERVICE)?'':$conf->global->PRODUCT_ELEPHANT_MASK_SERVICE;
if (! $mask)
{
$this->error='NotConfigured';

View File

@ -6,6 +6,7 @@
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -1473,8 +1474,10 @@ class pdf_azur extends ModelePDFPropales
{
$usertmp=new User($this->db);
$usertmp->fetch($arrayidcontact[0]);
$posy+=4;
$pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(190, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R');
$pdf->MultiCell(100, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R');
}
}

View File

@ -4,6 +4,7 @@
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -1111,8 +1112,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
{
$usertmp=new User($this->db);
$usertmp->fetch($arrayidcontact[0]);
$posy+=4;
$pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(190, 3, $langs->trans("BuyerName")." : ".$usertmp->getFullName($langs), '', 'R');
$pdf->MultiCell(100, 3, $langs->trans("BuyerName")." : ".$usertmp->getFullName($langs), '', 'R');
}
}

View File

@ -4,6 +4,7 @@
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -1288,8 +1289,10 @@ class pdf_aurore extends ModelePDFSupplierProposal
{
$usertmp=new User($this->db);
$usertmp->fetch($arrayidcontact[0]);
$posy+=4;
$pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(190, 3, $langs->trans("BuyerName")." : ".$usertmp->getFullName($langs), '', 'R');
$pdf->MultiCell(100, 3, $langs->trans("BuyerName")." : ".$usertmp->getFullName($langs), '', 'R');
}
}

View File

@ -3,6 +3,7 @@
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -1311,8 +1312,8 @@ if ($action == 'create')
print '<td>';
$defaultselectuser=$user->id;
if (GETPOST('fk_user_author') > 0) $defaultselectuser=GETPOST('fk_user_author');
$include_users = 'hierarchyme';
if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->expensereport->writeall_advance)) $include_users=array();
$include_users = 'hierarchyme';
if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->expensereport->writeall_advance)) $include_users=array();
$s=$form->select_dolusers($defaultselectuser, "fk_user_author", 0, "", 0, $include_users);
print $s;
print '</td>';

View File

@ -6,6 +6,7 @@
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Cedric Gross <c.gross@kreiz-it.fr>
* Copyright (C) 2016 Florian Henry <florian.henry@atm-consulting.fr>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -368,7 +369,7 @@ if ($id > 0 || ! empty($ref)) {
print "</td></tr>";
if ($object->methode_commande) {
print '<tr><td>' . $langs->trans("Method") . '</td><td>' . $commande->getInputMethod() . '</td></tr>';
print '<tr><td>' . $langs->trans("Method") . '</td><td>' . $object->getInputMethod() . '</td></tr>';
}
}

View File

@ -460,7 +460,7 @@ class Dolresource extends CommonObject
$extrafields=new ExtraFields($this->db);
$extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
if (is_array($extralabels) && count($extralabels)>0) {
foreach($extralabels as $label=>$code) {
foreach($extralabels as $code=>$label) {
$sql.= " ef.".$code." as extra_".$code.",";
}
}

View File

@ -119,12 +119,15 @@ $arrayfields = array(
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) {
foreach ( $extrafields->attribute_label as $key => $val ) {
$arrayfields["ef." . $key] = array(
'label' => $extrafields->attribute_label[$key],
'checked' => $extrafields->attribute_list[$key],
'position' => $extrafields->attribute_pos[$key],
'enabled' => $extrafields->attribute_perms[$key]
);
$typeofextrafield=$extrafields->attribute_type[$key];
if ($typeofextrafield!='separate') {
$arrayfields["ef." . $key] = array(
'label' => $extrafields->attribute_label[$key],
'checked' => $extrafields->attribute_list[$key],
'position' => $extrafields->attribute_pos[$key],
'enabled' => $extrafields->attribute_perms[$key]
);
}
}
}

View File

@ -88,7 +88,7 @@ $sortorder=GETPOST("sortorder",'alpha');
$page=GETPOST("page",'int');
if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="s.nom";
if ($page == -1) { $page = 0 ; }
if (empty($page) || $page == -1) { $page = 0 ; }
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
@ -240,7 +240,7 @@ if (empty($reshook))
$object->stcomm_id=dol_getIdFromCode($db, GETPOST('stcomm','alpha'), 'c_stcomm');
$result=$object->update($object->id, $user);
if ($result < 0) setEventMessages($object->error,$object->errors,'errors');
$action='';
}
}
@ -505,7 +505,7 @@ foreach ($search_array_options as $key => $val)
$crit=$val;
$tmpkey=preg_replace('/search_options_/','',$key);
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
}
}
// Show delete result message
if (GETPOST('delsoc'))
@ -619,9 +619,9 @@ if (! empty($arrayfields['s.fk_stcomm']['checked'])) print_liste_f
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
foreach($extrafields->attribute_label as $key => $val)
{
if (! empty($arrayfields["ef.".$key]['checked']))
if (! empty($arrayfields["ef.".$key]['checked']))
{
$align=$extrafields->getAlignFlag($key);
print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder);
@ -838,9 +838,9 @@ if (! empty($arrayfields['s.fk_stcomm']['checked']))
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
foreach($extrafields->attribute_label as $key => $val)
{
if (! empty($arrayfields["ef.".$key]['checked']))
if (! empty($arrayfields["ef.".$key]['checked']))
{
$align=$extrafields->getAlignFlag($key);
$typeofextrafield=$extrafields->attribute_type[$key];
@ -895,7 +895,7 @@ while ($i < min($num, $limit))
{
$obj = $db->fetch_object($resql);
$var=!$var;
$companystatic->id=$obj->rowid;
$companystatic->name=$obj->name;
$companystatic->canvas=$obj->canvas;
@ -906,7 +906,7 @@ while ($i < min($num, $limit))
$companystatic->code_fournisseur=$obj->code_fournisseur;
$companystatic->fk_prospectlevel=$obj->fk_prospectlevel;
$companystatic->name_alias=$obj->name_alias;
print "<tr ".$bc[$var].">";
if (! empty($arrayfields['s.nom']['checked']))
{
@ -948,12 +948,12 @@ while ($i < min($num, $limit))
if (! empty($arrayfields['s.zip']['checked']))
{
print "<td>".$obj->zip."</td>\n";
}
}
// State
if (! empty($arrayfields['state.nom']['checked']))
{
print "<td>".$obj->state_name."</td>\n";
}
}
// Country
if (! empty($arrayfields['country.code_iso']['checked']))
{

View File

@ -2517,7 +2517,7 @@ else
$var=true;
print $formfile->showdocuments('company', $object->id, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 0, 0, 0, 28, 0, '', 0, '', $object->default_lang);
print $formfile->showdocuments('company', $object->id, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 0, 0, 0, 28, 0, 'entity='.$object->entity, 0, '', $object->default_lang);
print '</div><div class="fichehalfright"><div class="ficheaddleft">';

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2007-2017 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
*
@ -158,25 +158,25 @@ if (! empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED))
// Set text color to black or white
$tmppart=explode(',',$colorbackhmenu1);
$tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : '');
$tmpval=(! empty($tmppart[0]) ? $tmppart[0] : '')+(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '');
if ($tmpval <= 360) $colortextbackhmenu='FFFFFF';
else $colortextbackhmenu='000000';
$tmppart=explode(',',$colorbackvmenu1);
$tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : '');
$tmpval=(! empty($tmppart[0]) ? $tmppart[0] : '')+(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '');
if ($tmpval <= 360) { $colortextbackvmenu='FFFFFF'; }
else { $colortextbackvmenu='000000'; }
$tmppart=explode(',',$colorbacktitle1);
if ($colortexttitle == '')
{
$tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : '');
$tmpval=(! empty($tmppart[0]) ? $tmppart[0] : '')+(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '');
if ($tmpval <= 360) { $colortexttitle='FFFFFF'; $colorshadowtitle='888888'; }
else { $colortexttitle='000000'; $colorshadowtitle='FFFFFF'; }
}
$tmppart=explode(',',$colorbacktabcard1);
$tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : '');
$tmpval=(! empty($tmppart[0]) ? $tmppart[0] : '')+(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '');
if ($tmpval <= 340) { $colortextbacktab='FFFFFF'; }
else { $colortextbacktab='111111'; }
@ -255,7 +255,7 @@ a.tab { font-weight: bold !important; }
a:link, a:visited, a:hover, a:active { font-family: <?php print $fontlist ?>; font-weight: normal; color: rgb(<?php print $colortextlink; ?>); text-decoration: none; }
a:hover { text-decoration: underline; color: rgb(<?php print $colortextlink; ?>); }
a.commonlink { color: rgb(<?php print $colortextlink; ?>) !important; text-decoration: none; }
a.commonlink { color: rgb(<?php print $colortextlink; ?>) !important; text-decoration: none; }
input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select {
background-color: #FFF;
@ -285,7 +285,7 @@ textarea.cke_source:focus
input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select {
font-size: <?php print $fontsize ?>px;
font-family: <?php print $fontlist ?>;
border: 1px solid #C0C0C0;
/* v6 border: none;
border-bottom: 1px solid #C0C0C0;
@ -310,7 +310,7 @@ textarea {
border: solid 1px rgba(0,0,0,.3);
border-top:solid 1px rgba(0,0,0,.3);
border-bottom:solid 1px rgba(0,0,0,.2);
padding:4px;
margin-left:0px;
margin-bottom:1px;
@ -622,13 +622,13 @@ div.myavailability {
overflow-y: hidden;
-ms-overflow-style: -ms-autohiding-scrollbar;
}*/
/* Style used for most tables */
/* Style used for most tables */
.div-table-responsive, .div-table-responsive-no-min {
overflow-x: auto;
min-height: 0.01%;
line-height: 100%;
}
/* Style used for full page tables with field selector and no content after table (priority before previous for such tables) */
/* Style used for full page tables with field selector and no content after table (priority before previous for such tables) */
div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min {
overflow-x: auto;
}
@ -717,20 +717,20 @@ div.fiche>form>div.div-table-responsive {
.border tbody tr, .border tbody tr td, div.tabBar table.border tr, div.tabBar table.border tr td, div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border-col, div.tabBar div.border .table-val-border-col {
height: 40px !important;
}
.quatrevingtpercent, .inputsearch {
width: 95%;
}
input, input[type=text], input[type=password], select, textarea {
min-width: 20px;
input, input[type=text], input[type=password], select, textarea {
min-width: 20px;
min-height: 1.4em;
line-height: 1.4em;
padding: .4em .1em;
border: 1px solid #BBB;
/* max-width: inherit; why this ? */
}
.hideonsmartphone { display: none; }
.noenlargeonsmartphone { width : 50px !important; display: inline !important; }
.maxwidthonsmartphone, #search_newcompany.ui-autocomplete-input { max-width: 100px; }
@ -749,20 +749,20 @@ div.fiche>form>div.div-table-responsive {
.minwidth500imp { min-width: 50px !important; }
.titlefield { width: auto; }
.titlefieldcreate { width: auto; }
#tooltip {
position: absolute;
width: <?php print dol_size(300,'width'); ?>px;
}
/* intput, input[type=text], */
select {
width: 98%;
min-width: 40px;
}
div.divphotoref {
padding-right: 5px;
padding-right: 5px;
}
img.photoref, div.photoref {
border: none;
@ -774,7 +774,7 @@ div.fiche>form>div.div-table-responsive {
width: 20px;
object-fit: contain;
}
}
.linkobject { cursor: pointer; }
<?php if (GETPOST("optioncss") == 'print') { ?>
@ -1241,7 +1241,7 @@ div.menu_titre {
padding-top: 4px;
padding-bottom: 4px;
overflow: hidden;
text-overflow: ellipsis;
text-overflow: ellipsis;
}
.mainmenuaspan
{
@ -1444,7 +1444,7 @@ form#login {
-moz-box-shadow: 0 2px 23px 2px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(60,60,60,0.15);
-webkit-box-shadow: 0 2px 23px 2px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(60,60,60,0.15);
box-shadow: 0 2px 23px 2px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(60,60,60,0.15);
/*-moz-box-shadow: 3px 2px 20px #CCC;
-webkit-box-shadow: 3px 2px 20px #CCC;
box-shadow: 3px 2px 20px #CCC;*/
@ -1648,7 +1648,7 @@ a.vsmenu.addbookmarkpicto {
{
/* border-bottom: 1px solid #BBB; */
}
div.blockvmenusearchphone
div.blockvmenusearchphone
{
border-bottom: none !important;
}
@ -2513,8 +2513,8 @@ div.liste_titre_bydiv .divsearchfield {
padding: 2px 1px 2px 0px; /* t r b l */
}
tr.box_titre .nobordernopadding td {
padding: 0px ! important;
tr.box_titre .nobordernopadding td {
padding: 0px ! important;
}
table.nobordernopadding {
border-collapse: collapse !important;
@ -2809,7 +2809,7 @@ div.liste_titre_bydiv {
border-top-width: <?php echo $borderwith ?>px;
border-top-color: rgb(<?php echo $colortopbordertitle1 ?>);
border-top-style: solid;
border-collapse: collapse;
display: table;
padding: 2px 0px 2px 0;
@ -3421,7 +3421,7 @@ td.hidden {
border-bottom: 1px solid #888;
background: #eee;
}
.websitebar .button, .websitebar .buttonDelete
.websitebar .button, .websitebar .buttonDelete
{
padding: 2px 5px 3px 5px !important;
margin: 2px 4px 2px 4px !important;
@ -3430,7 +3430,7 @@ td.hidden {
.websiteselection {
display: inline-block;
padding-left: 10px;
vertical-align: middle;
vertical-align: middle;
line-height: 29px;
}
.websitetools {

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2007-2017 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
@ -159,25 +159,25 @@ if (empty($colortopbordertitle1)) $colortopbordertitle1=$colorbackhmenu1;
// Set text color to black or white
$tmppart=explode(',',$colorbackhmenu1);
$tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : '');
$tmpval=(! empty($tmppart[0]) ? $tmppart[0] : '')+(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '');
if ($tmpval <= 360) $colortextbackhmenu='FFFFFF';
else $colortextbackhmenu='000000';
$tmppart=explode(',',$colorbackvmenu1);
$tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : '');
$tmpval=(! empty($tmppart[0]) ? $tmppart[0] : '')+(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '');
if ($tmpval <= 360) { $colortextbackvmenu='FFFFFF'; }
else { $colortextbackvmenu='000000'; }
$tmppart=explode(',',$colorbacktitle1);
if ($colortexttitle == '')
{
$tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : '');
$tmpval=(! empty($tmppart[0]) ? $tmppart[0] : '')+(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '');
if ($tmpval <= 260) { $colortexttitle='FFFFFF'; $colorshadowtitle='888888'; }
else { $colortexttitle='101010'; $colorshadowtitle='FFFFFF'; }
}
$tmppart=explode(',',$colorbacktabcard1);
$tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : '');
$tmpval=(! empty($tmppart[0]) ? $tmppart[0] : '')+(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '');
if ($tmpval <= 340) { $colortextbacktab='FFFFFF'; }
else { $colortextbacktab='111111'; }
@ -255,7 +255,7 @@ a.tab { font-weight: bold !important; }
a:link, a:visited, a:hover, a:active { font-family: <?php print $fontlist ?>; font-weight: normal; color: rgb(<?php print $colortextlink; ?>); text-decoration: none; }
a:hover { text-decoration: underline; color: rgb(<?php print $colortextlink; ?>); }
a.commonlink { color: rgb(<?php print $colortextlink; ?>) !important; text-decoration: none; }
a.commonlink { color: rgb(<?php print $colortextlink; ?>) !important; text-decoration: none; }
input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select {
background-color: #FDFDFD;
@ -526,7 +526,7 @@ div.divsearchfield {
margin-<?php print $left; ?>: 2px;
margin-top: 4px;
margin-bottom: 4px;
padding-left: 2px;
padding-left: 2px;
}
div.confirmmessage {
padding-top: 6px;
@ -540,8 +540,8 @@ div.myavailability {
}
.checkallactions {
vertical-align: top;
margin-top: 6px;
margin-left: 4px;
margin-top: 6px;
margin-left: 4px;
}
.selectlimit, .marginrightonly {
margin-right: 10px !important;
@ -599,13 +599,13 @@ div.myavailability {
overflow-y: hidden;
-ms-overflow-style: -ms-autohiding-scrollbar;
}*/
/* Style used for most tables */
/* Style used for most tables */
.div-table-responsive, .div-table-responsive-no-min {
overflow-x: auto;
min-height: 0.01%;
line-height: 100%;
}
/* Style used for full page tables with field selector and no content after table (priority before previous for such tables) */
/* Style used for full page tables with field selector and no content after table (priority before previous for such tables) */
div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min {
overflow-x: auto;
}
@ -652,7 +652,7 @@ div.fiche>form>div.div-table-responsive {
.titlefield { width: 25%; }
.titlefieldmiddle { width: 50%; }
.imgmaxwidth180 { max-width: 180px; }
/* Force values for small screen 1400 */
@media only screen and (max-width: 1400px)
@ -695,20 +695,20 @@ div.fiche>form>div.div-table-responsive {
.border tbody tr, .border tbody tr td, div.tabBar table.border tr {
height: 40px !important;
}
.quatrevingtpercent, .inputsearch {
width: 95%;
}
input, input[type=text], input[type=password], select, textarea {
min-width: 20px;
input, input[type=text], input[type=password], select, textarea {
min-width: 20px;
min-height: 1.4em;
line-height: 1.4em;
padding: .4em .1em;
border: 1px solid #BBB;
/* max-width: inherit; why this */
}
.hideonsmartphone { display: none; }
.noenlargeonsmartphone { width : 50px !important; display: inline !important; }
.maxwidthonsmartphone, #search_newcompany.ui-autocomplete-input { max-width: 100px; }
@ -727,20 +727,20 @@ div.fiche>form>div.div-table-responsive {
.minwidth500imp { min-width: 50px !important; }
.titlefield { width: auto; }
.titlefieldcreate { width: auto; }
#tooltip {
position: absolute;
width: <?php print dol_size(300,'width'); ?>px;
}
/* intput, input[type=text], */
select {
width: 98%;
min-width: 40px;
}
div.divphotoref {
padding-right: 5px;
padding-right: 5px;
}
img.photoref, div.photoref {
border: none;
@ -751,7 +751,7 @@ div.fiche>form>div.div-table-responsive {
height: 20px;
width: 20px;
object-fit: contain;
}
}
}
.linkobject { cursor: pointer; }
<?php if (GETPOST("optioncss") == 'print') { ?>
@ -804,7 +804,7 @@ td.showDragHandle {
<?php if (GETPOST("optioncss") != 'print') { ?>
padding-left: 229px;
padding-top: 12px;
<?php } ?>
<?php } ?>
}
.side-nav {
@ -1019,7 +1019,7 @@ table.noborder tr.liste_titre td {
padding-right: 1px;
padding-top: 1px;
padding-bottom: 1px;
width: 44px;
width: 44px;
}
div.attacharea {
padding-top: 10px;
@ -1035,7 +1035,7 @@ div.arearefnobottom {
padding-bottom: 4px;
}
div.heightref {
min-height: 80px;
min-height: 80px;
}
div.divphotoref {
padding-right: 20px;
@ -1251,7 +1251,7 @@ div.tmenucenter
div.menu_titre {
padding-bottom: 2px;
overflow: hidden;
text-overflow: ellipsis;
text-overflow: ellipsis;
}
.mainmenuaspan
{
@ -1627,8 +1627,8 @@ div.vmenu, td.vmenu {
width: 202px;
}
.menu_contenu {
padding-top: 4px;
.menu_contenu {
padding-top: 4px;
padding-bottom: 3px;
overflow: hidden;
text-overflow: ellipsis;
@ -2206,16 +2206,16 @@ span.butAction, span.butActionDelete {
text-shadow: none;
border-color: #555;
cursor: not-allowed;
background-color: #f5f5f5;
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
background-repeat: repeat-x
background-repeat: repeat-x
}
.butActionDelete, .buttonDelete {
color: #ffffff !important;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
@ -2360,9 +2360,9 @@ table.liste, table.noborder, table.formdoc, div.noborder {
border-bottom-width: 1px;
border-bottom-color: #BBB;
border-bottom-style: solid;
margin: 0px 0px 8px 0px;
-moz-border-radius: 0.1em;
-webkit-border-radius: 0.1em;
border-radius: 0.1em;
@ -2620,7 +2620,7 @@ div.pagination li.paginationafterarrows {
margin-bottom: 1px;
color: #202020;
min-height: 18px; /* seems to not be used */
background: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?>;
}
#GanttChartDIV {
@ -2687,7 +2687,7 @@ div.liste_titre_bydiv {
border-top-width: <?php echo $borderwith ?>px;
border-top-color: rgb(<?php echo $colortopbordertitle1 ?>);
border-top-style: solid;
box-shadow: none;
border-collapse: collapse;
display: table;
@ -2710,7 +2710,7 @@ div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.list
background: rgb(<?php echo $colorbacktitle1; ?>);
<?php } ?>
font-weight: <?php echo $useboldtitle?'bold':'normal'; ?>;
color: rgb(<?php echo $colortexttitle; ?>);
font-family: <?php print $fontlist ?>;
border-bottom: 1px solid #FDFFFF;
@ -2878,7 +2878,7 @@ span.dashboardlineko {
tr.box_titre {
height: 26px !important;
/* TO MATCH BOOTSTRAP */
/*background: #ddd;
color: #000 !important; */
@ -2893,7 +2893,7 @@ tr.box_titre {
<?php } else { ?>
background: rgb(<?php echo $colorbacktitle1; ?>);
<?php } ?>
background-repeat: repeat-x;
color: rgb(<?php echo $colortexttitle; ?>);
font-family: <?php print $fontlist ?>, sans-serif;
@ -3326,7 +3326,7 @@ td.hidden {
border-bottom: 1px solid #888;
background: #eee;
}
.websitebar .button, .websitebar .buttonDelete
.websitebar .button, .websitebar .buttonDelete
{
padding: 2px 4px 2px 4px !important;
margin: 2px 4px 2px 4px !important;
@ -3335,7 +3335,7 @@ td.hidden {
.websiteselection {
display: inline-block;
padding-left: 10px;
vertical-align: middle;
vertical-align: middle;
line-height: 29px;
}
.websitetools {
@ -4496,12 +4496,12 @@ img.demothumb {
@media only screen and (max-width: 767px)
{
.imgopensurveywizard, .imgautosize { width:95%; height: auto; }
#tooltip {
position: absolute;
width: <?php print dol_size(350,'width'); ?>px;
}
img.demothumb {
box-shadow: 1px 1px 4px #BBB;
margin-right: 6px;
@ -4518,7 +4518,7 @@ img.demothumb {
border-right: none;
border-left: none;
}
}
@ -4592,7 +4592,7 @@ img.demothumb {
div.mainmenu {
min-width: 20px;
}
#tooltip {
position: absolute;
width: <?php print dol_size(300,'width'); ?>px;
@ -4602,7 +4602,7 @@ img.demothumb {
min-width: 0 !important;
}
div.divphotoref {
padding-right: 5px;
padding-right: 5px;
}
img.photoref, div.photoref {
border: none;
@ -4614,7 +4614,7 @@ img.demothumb {
width: 20px;
object-fit: contain;
}
}

View File

@ -76,7 +76,7 @@ if ($user->id <> $id && ! $canreaduser) accessforbidden();
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0; }
if (empty($page) || $page == -1) { $page = 0; }
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
@ -132,11 +132,11 @@ if ($object->id)
dol_fiche_head($head, 'document', $langs->trans("User"),0,'user');
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
print '<div class="underbanner clearboth"></div>';
// 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;
@ -160,7 +160,7 @@ if ($object->id)
print '</table>';
dol_fiche_end();
$modulepart = 'user';
$permission = $user->rights->user->user->creer;

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
*
* This program is free software; you can redistribute it and/or modify
@ -43,7 +43,7 @@ $limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
$sortfield = GETPOST('sortfield','alpha');
$sortorder = GETPOST('sortorder','alpha');
$page = GETPOST('page','int');
if ($page == -1) { $page = 0; }
if (empty($page) || $page == -1) { $page = 0; }
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
@ -115,16 +115,16 @@ $resql = $db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$nbtotalofrecords = $num;
$i = 0;
$param="&search_group=".urlencode($search_group)."&amp;sall=".urlencode($sall);
if ($optioncss != '') $param.='&amp;optioncss='.$optioncss;
$text = $langs->trans("ListOfGroups");
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
@ -133,26 +133,26 @@ if ($resql)
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print_barre_liste($text, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, "", $num, $nbtotalofrecords, 'title_generic', 0, '', '', $limit);
if ($sall)
{
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
}
if ($sall)
{
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
}
if ($sall)
{
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
}
$moreforfilter='';
//$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
//$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
@ -166,7 +166,7 @@ if ($resql)
print_liste_field_titre($langs->trans("NbOfUsers"),$_SERVER["PHP_SELF"],"nb",$param,"",'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateCreationShort"),$_SERVER["PHP_SELF"],"g.datec",$param,"",'align="right"',$sortfield,$sortorder);
print "</tr>\n";
$var=True;
while ($i < $num)
{
@ -192,10 +192,10 @@ if ($resql)
$i++;
}
print "</table>";
print '</div>';
print "</form>\n";
$db->free();
}
else

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
*
@ -50,7 +50,7 @@ $limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
$sortfield = GETPOST('sortfield','alpha');
$sortorder = GETPOST('sortorder','alpha');
$page = GETPOST('page','int');
if ($page == -1) { $page = 0; }
if (empty($page) || $page == -1) { $page = 0; }
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
@ -103,7 +103,7 @@ $arrayfields=array(
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
foreach($extrafields->attribute_label as $key => $val)
{
$arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>$extrafields->attribute_list[$key], 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>$extrafields->attribute_perms[$key]);
}
@ -146,7 +146,7 @@ if (empty($reshook))
{
// Selection of new fields
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
// Purge search criteria
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") ||GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
{
@ -224,7 +224,7 @@ foreach ($search_array_options as $key => $val)
$typ=$extrafields->attribute_type[$tmpkey];
$mode=0;
if (in_array($typ, array('int','double'))) $mode=1; // Search on a numeric
if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit)))
if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit)))
{
$sql .= natural_search('ef.'.$tmpkey, $crit, $mode);
}
@ -285,7 +285,7 @@ foreach ($search_array_options as $key => $val)
$crit=$val;
$tmpkey=preg_replace('/search_options_/','',$key);
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
}
}
$text = $langs->trans("ListOfUsers");
@ -331,9 +331,9 @@ if (! empty($arrayfields['u.datepreviouslogin']['checked'])) print_liste_field_t
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
foreach($extrafields->attribute_label as $key => $val)
{
if (! empty($arrayfields["ef.".$key]['checked']))
if (! empty($arrayfields["ef.".$key]['checked']))
{
$align=$extrafields->getAlignFlag($key);
print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder);
@ -368,7 +368,7 @@ if (! empty($arrayfields['u.gender']['checked']))
{
print '<td class="liste_titre">';
$arraygender=array('man'=>$langs->trans("Genderman"),'woman'=>$langs->trans("Genderwoman"));
print $form->selectarray('search_gender', $arraygender, $search_gender, 1);
print $form->selectarray('search_gender', $arraygender, $search_gender, 1);
print '</td>';
}
if (! empty($arrayfields['u.employee']['checked']))
@ -408,9 +408,9 @@ if (! empty($arrayfields['u.datepreviouslogin']['checked']))
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
foreach($extrafields->attribute_label as $key => $val)
{
if (! empty($arrayfields["ef.".$key]['checked']))
if (! empty($arrayfields["ef.".$key]['checked']))
{
$align=$extrafields->getAlignFlag($key);
$typeofextrafield=$extrafields->attribute_type[$key];
@ -479,7 +479,7 @@ while ($i < min($num,$limit))
$userstatic->lastname=$obj->lastname;
$userstatic->employee=$obj->employee;
$userstatic->photo=$obj->photo;
$li=$userstatic->getNomUrl(-1,'',0,0,24,1,'login');
print "<tr ".$bc[$var].">";
@ -592,8 +592,8 @@ while ($i < min($num,$limit))
}
}
print '</td>';
}
}
// Date last login
if (! empty($arrayfields['u.datelastlogin']['checked']))
{
@ -604,13 +604,13 @@ while ($i < min($num,$limit))
{
print '<td class="nowrap" align="center">'.dol_print_date($db->jdate($obj->datepreviouslogin),"dayhour").'</td>';
}
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
foreach($extrafields->attribute_label as $key => $val)
{
if (! empty($arrayfields["ef.".$key]['checked']))
if (! empty($arrayfields["ef.".$key]['checked']))
{
print '<td';
$align=$extrafields->getAlignFlag($key);