Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
Conflicts: htdocs/core/lib/functions.lib.php htdocs/theme/eldy/style.css.php htdocs/theme/md/style.css.php htdocs/user/index.php
This commit is contained in:
commit
7939daa225
@ -39,7 +39,7 @@ if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
||||
require_once '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL by the main.inc.php
|
||||
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php
|
||||
$langs->load("main");
|
||||
$langs->load("agenda");
|
||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||
|
||||
@ -35,7 +35,7 @@ if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
||||
|
||||
require_once '../main.inc.php';
|
||||
|
||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL by the main.inc.php
|
||||
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php
|
||||
$langs->load("main");
|
||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||
|
||||
@ -289,6 +289,9 @@ function GETPOST($paramname,$check='',$method=0,$filter=NULL,$options=NULL)
|
||||
case 'intcomma':
|
||||
if (preg_match('/[^0-9,]+/i',$out)) $out='';
|
||||
break;
|
||||
case 'intcomma':
|
||||
if (preg_match('/[^0-9,]+/i',$out)) $out='';
|
||||
break;
|
||||
case 'alpha':
|
||||
$out=trim($out);
|
||||
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
|
||||
|
||||
@ -35,7 +35,7 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
|
||||
|
||||
require_once '../main.inc.php';
|
||||
|
||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL by the main.inc.php
|
||||
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php
|
||||
$langs->load("main");
|
||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||
@ -76,11 +76,11 @@ if ($conf->use_javascript_ajax && 1 == 2) // select2 is ko with jmobile
|
||||
else
|
||||
{
|
||||
$conf->global->MAIN_HTML5_PLACEHOLDER = 1;
|
||||
|
||||
|
||||
|
||||
|
||||
$usedbyinclude = 1; // Used into next include
|
||||
include DOL_DOCUMENT_ROOT.'/core/ajax/selectsearchbox.php';
|
||||
|
||||
|
||||
$accesskeyalreadyassigned=array();
|
||||
foreach($arrayresult as $key => $val)
|
||||
{
|
||||
|
||||
@ -38,7 +38,7 @@ $mainmenu=GETPOST('mainmenu', 'alpha');
|
||||
$leftmenu=GETPOST('leftmenu', 'alpha');
|
||||
$idmenu=GETPOST('idmenu', 'int');
|
||||
$theme=GETPOST('theme', 'alpha');
|
||||
$codelang=GETPOST('lang', 'alpha');
|
||||
$codelang=GETPOST('lang', 'aZ09');
|
||||
|
||||
print "
|
||||
<html>
|
||||
|
||||
@ -2591,19 +2591,29 @@ elseif (! empty($object->id))
|
||||
// Create bill
|
||||
if (! empty($conf->facture->enabled))
|
||||
{
|
||||
if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->billed != 1)) // 2 means accepted
|
||||
if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->billed != 1)) // statut 2 means approved
|
||||
{
|
||||
if ($user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';
|
||||
}
|
||||
|
||||
if ($user->rights->fournisseur->commande->creer && $object->statut >= 2 && !empty($object->linkedObjectsIds['invoice_supplier']))
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Classify billed manually (need one invoice if module invoice is on, no condition on invoice if not)
|
||||
if ($user->rights->fournisseur->commande->creer && $object->statut >= 2 && $object->billed != 1) // statut 2 means approved
|
||||
{
|
||||
if (empty($conf->facture->enabled))
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
|
||||
}
|
||||
else if (!empty($object->linkedObjectsIds['invoice_supplier']))
|
||||
{
|
||||
if ($user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create a remote order using WebService only if module is activated
|
||||
|
||||
@ -265,7 +265,7 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* removed in PHP 5.
|
||||
|
||||
// Defini objet langs
|
||||
$langs = new Translate('..',$conf);
|
||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang'));
|
||||
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09'));
|
||||
else $langs->setDefaultLang('auto');
|
||||
|
||||
$bc[false]=' class="bg1"';
|
||||
@ -452,9 +452,9 @@ function pFooter($nonext=0,$setuplang='',$jscheckfunction='', $withpleasewait=0)
|
||||
print '<div class="nextbutton" id="nextbutton">';
|
||||
if ($nonext == '2')
|
||||
{
|
||||
print $langs->trans("ErrorFoundDuringMigration", $_SERVER["REQUEST_URI"].'&ignoreerrors=1').'<br><br>';
|
||||
print $langs->trans("ErrorFoundDuringMigration", $_SERVER["REQUEST_URI"].'&ignoreerrors=1').'<br><br>';
|
||||
}
|
||||
|
||||
|
||||
print '<input type="submit" '.($nonext == '2' ? 'disabled="disabled" ':'').'value="'.$langs->trans("NextStep").' ->"';
|
||||
if ($jscheckfunction) print ' onClick="return '.$jscheckfunction.'();"';
|
||||
print '></div>';
|
||||
|
||||
@ -576,7 +576,7 @@ if (! defined('NOLOGIN'))
|
||||
$paramsurl=array();
|
||||
if (GETPOST('textbrowser')) $paramsurl[]='textbrowser='.GETPOST('textbrowser','int');
|
||||
if (GETPOST('nojs')) $paramsurl[]='nojs='.GETPOST('nojs','int');
|
||||
if (GETPOST('lang')) $paramsurl[]='lang='.GETPOST('lang','alpha');
|
||||
if (GETPOST('lang')) $paramsurl[]='lang='.GETPOST('lang', 'aZ09');
|
||||
header('Location: '.DOL_URL_ROOT.'/index.php'.(count($paramsurl)?'?'.implode('&',$paramsurl):''));
|
||||
exit;
|
||||
}
|
||||
@ -635,7 +635,7 @@ if (! defined('NOLOGIN'))
|
||||
$paramsurl=array();
|
||||
if (GETPOST('textbrowser')) $paramsurl[]='textbrowser='.GETPOST('textbrowser','int');
|
||||
if (GETPOST('nojs')) $paramsurl[]='nojs='.GETPOST('nojs','int');
|
||||
if (GETPOST('lang')) $paramsurl[]='lang='.GETPOST('lang','alpha');
|
||||
if (GETPOST('lang')) $paramsurl[]='lang='.GETPOST('lang', 'aZ09');
|
||||
header('Location: '.DOL_URL_ROOT.'/index.php'.(count($paramsurl)?'?'.implode('&',$paramsurl):''));
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -246,7 +246,7 @@ if (! defined('NOREQUIREDB') && ! defined('NOREQUIRESOC'))
|
||||
// Set default language (must be after the setValues setting global $conf->global->MAIN_LANG_DEFAULT. Page main.inc.php will overwrite langs->defaultlang with user value later)
|
||||
if (! defined('NOREQUIRETRAN'))
|
||||
{
|
||||
$langcode=(GETPOST('lang')?GETPOST('lang','alpha',1):(empty($conf->global->MAIN_LANG_DEFAULT)?'auto':$conf->global->MAIN_LANG_DEFAULT));
|
||||
$langcode=(GETPOST('lang', 'aZ09')?GETPOST('lang', 'aZ09', 1):(empty($conf->global->MAIN_LANG_DEFAULT)?'auto':$conf->global->MAIN_LANG_DEFAULT));
|
||||
$langs->setDefaultLang($langcode);
|
||||
}
|
||||
|
||||
|
||||
@ -149,7 +149,7 @@ if (empty($conf->db->user)) $conf->db->user='';
|
||||
|
||||
// Defini objet langs
|
||||
$langs = new Translate('..',$conf);
|
||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang'));
|
||||
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09'));
|
||||
else $langs->setDefaultLang('auto');
|
||||
|
||||
$bc[false]=' class="bg1"';
|
||||
|
||||
@ -53,7 +53,7 @@ else header('Cache-Control: no-cache');
|
||||
// On the fly GZIP compression for all pages (if browser support it). Must set the bit 3 of constant to 1.
|
||||
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); }
|
||||
|
||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang', 'alpha')); // If language was forced on URL
|
||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL
|
||||
if (GETPOST('theme')) $conf->theme=GETPOST('theme', 'alpha'); // If theme was forced on URL
|
||||
$langs->load("main",0,1);
|
||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||
|
||||
@ -54,7 +54,7 @@ else header('Cache-Control: no-cache');
|
||||
// On the fly GZIP compression for all pages (if browser support it). Must set the bit 3 of constant to 1.
|
||||
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); }
|
||||
|
||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL
|
||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL
|
||||
if (GETPOST('theme')) $conf->theme=GETPOST('theme'); // If theme was forced on URL
|
||||
$langs->load("main",0,1);
|
||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||
@ -2378,6 +2378,15 @@ table.liste, table.noborder, table.formdoc, div.noborder {
|
||||
border-bottom-style: solid;
|
||||
|
||||
margin: 0px 0px 8px 0px;
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
/*
|
||||
-moz-box-shadow: 2px 2px 4px #CCC;
|
||||
-webkit-box-shadow: 2px 2px 4px #CCC;
|
||||
box-shadow: 2px 2px 4px #CCC;
|
||||
*/
|
||||
/* box-shadow: 0 0 3px rgba(0,0,0,0.16); */
|
||||
>>>>>>> branch '4.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
|
||||
-moz-border-radius: 0.1em;
|
||||
-webkit-border-radius: 0.1em;
|
||||
@ -4523,7 +4532,11 @@ img.demothumb {
|
||||
}
|
||||
@media only screen and (max-width: 767px)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
.imgopensurveywizard, .imgautosize { width:95%; height: auto; }
|
||||
=======
|
||||
.imgopensurveywizard { width:95%; height: auto; }
|
||||
>>>>>>> branch '4.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
|
||||
#tooltip {
|
||||
position: absolute;
|
||||
|
||||
@ -251,8 +251,89 @@ if (! $result)
|
||||
exit;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
$num = $db->num_rows($result);
|
||||
=======
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($sall != '') $param.='&sall='.urlencode($sall);
|
||||
if ($search_user != '') $param.="&search_user=".$search_user;
|
||||
if ($search_login != '') $param.="&search_login=".$search_login;
|
||||
if ($search_lastname != '') $param.="&search_lastname=".$search_lastname;
|
||||
if ($search_firstname != '') $param.="&search_firstname=".$search_firstname;
|
||||
if ($search_gender != '') $param.="&search_gender=".$search_gender;
|
||||
if ($search_employee != '') $param.="&search_employee=".$search_employee;
|
||||
if ($search_accountancy_code != '') $param.="&search_accountancy_code=".$search_accountancy_code;
|
||||
if ($search_email != '') $param.="&search_email=".$search_email;
|
||||
if ($search_supervisor > 0) $param.="&search_supervisor=".$search_supervisor;
|
||||
if ($search_statut != '') $param.="&search_statut=".$search_statut;
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
// Add $param from extra fields
|
||||
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" 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'].'">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
|
||||
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 '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['u.login']['checked'])) print_liste_field_titre($langs->trans("Login"),$_SERVER['PHP_SELF'],"u.login",$param,"","",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['u.lastname']['checked'])) print_liste_field_titre($langs->trans("Lastname"),$_SERVER['PHP_SELF'],"u.lastname",$param,"","",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['u.firstname']['checked'])) print_liste_field_titre($langs->trans("FirstName"),$_SERVER['PHP_SELF'],"u.firstname",$param,"","",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['u.gender']['checked'])) print_liste_field_titre($langs->trans("Gender"),$_SERVER['PHP_SELF'],"u.gender",$param,"","",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['u.employee']['checked'])) print_liste_field_titre($langs->trans("Employee"),$_SERVER['PHP_SELF'],"u.employee",$param,"","",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['u.accountancy_code']['checked'])) print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER['PHP_SELF'],"u.accountancy_code",$param,"","",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['u.email']['checked'])) print_liste_field_titre($langs->trans("EMail"),$_SERVER['PHP_SELF'],"u.email",$param,"","",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['u.fk_soc']['checked'])) print_liste_field_titre($langs->trans("Company"),$_SERVER['PHP_SELF'],"u.fk_soc",$param,"","",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['u.entity']['checked'])) print_liste_field_titre($langs->trans("Entity"),$_SERVER['PHP_SELF'],"u.entity",$param,"","",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['u.fk_user']['checked'])) print_liste_field_titre($langs->trans("HierarchicalResponsible"),$_SERVER['PHP_SELF'],"u.fk_user",$param,"","",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['u.datelastlogin']['checked'])) print_liste_field_titre($langs->trans("LastConnexion"),$_SERVER['PHP_SELF'],"u.datelastlogin",$param,"",'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['u.datepreviouslogin']['checked'])) print_liste_field_titre($langs->trans("PreviousConnexion"),$_SERVER['PHP_SELF'],"u.datepreviouslogin",$param,"",'align="center"',$sortfield,$sortorder);
|
||||
// Extra fields
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key => $val)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Hook fields
|
||||
$parameters=array('arrayfields'=>$arrayfields);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (! empty($arrayfields['u.datec']['checked'])) print_liste_field_titre($langs->trans("DateCreationShort"),$_SERVER["PHP_SELF"],"u.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['u.tms']['checked'])) print_liste_field_titre($langs->trans("DateModificationShort"),$_SERVER["PHP_SELF"],"u.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['u.statut']['checked'])) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"u.statut","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
>>>>>>> branch '4.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
|
||||
<<<<<<< HEAD
|
||||
if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
@ -416,6 +497,69 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
$typeofextrafield=$extrafields->attribute_type[$key];
|
||||
print '<td class="liste_titre'.($align?' '.$align:'').'">';
|
||||
if (in_array($typeofextrafield, array('varchar', 'int', 'double', 'select')))
|
||||
=======
|
||||
// Search bar
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['u.login']['checked']))
|
||||
{
|
||||
print '<td><input type="text" name="search_login" size="6" value="'.$search_login.'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.lastname']['checked']))
|
||||
{
|
||||
print '<td><input type="text" name="search_lastname" size="6" value="'.$search_lastname.'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.firstname']['checked']))
|
||||
{
|
||||
print '<td><input type="text" name="search_firstname" size="6" value="'.$search_firstname.'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.gender']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
$arraygender=array('man'=>$langs->trans("Genderman"),'woman'=>$langs->trans("Genderwoman"));
|
||||
print $form->selectarray('search_gender', $arraygender, $search_gender, 1);
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.employee']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
print $form->selectyesno('search_employee', $search_employee, 1, false, 1);
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.accountancy_code']['checked']))
|
||||
{
|
||||
print '<td><input type="text" name="search_accountancy_code" size="4" value="'.$search_accountancy_code.'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.email']['checked']))
|
||||
{
|
||||
print '<td><input type="text" name="search_email" size="6" value="'.$search_email.'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.fk_soc']['checked']))
|
||||
{
|
||||
print '<td><input type="text" name="search_thirdparty" size="6" value="'.$search_thirdparty.'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.entity']['checked']))
|
||||
{
|
||||
print '<td></td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.fk_user']['checked']))
|
||||
{
|
||||
print '<td></td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.datelastlogin']['checked']))
|
||||
{
|
||||
print '<td></td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.datepreviouslogin']['checked']))
|
||||
{
|
||||
print '<td></td>';
|
||||
}
|
||||
// Extra fields
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key => $val)
|
||||
{
|
||||
if (! empty($arrayfields["ef.".$key]['checked']))
|
||||
>>>>>>> branch '4.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
{
|
||||
$crit=$val;
|
||||
$tmpkey=preg_replace('/search_options_/','',$key);
|
||||
@ -647,10 +791,222 @@ while ($i < min($num,$limit))
|
||||
print '<td align="center">'.$userstatic->getLibStatut(3).'</td>';
|
||||
}
|
||||
// Action column
|
||||
<<<<<<< HEAD
|
||||
print '<td></td>';
|
||||
=======
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpitco;
|
||||
print '</td>';
|
||||
>>>>>>> branch '4.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
|
||||
print "</tr>\n";
|
||||
<<<<<<< HEAD
|
||||
$i++;
|
||||
=======
|
||||
|
||||
$user2=new User($db);
|
||||
|
||||
$var=True;
|
||||
//while ($i < min($num,$conf->liste_limit))
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
|
||||
$userstatic->id=$obj->rowid;
|
||||
$userstatic->ref=$obj->label;
|
||||
$userstatic->login=$obj->login;
|
||||
$userstatic->statut=$obj->statut;
|
||||
$userstatic->email=$obj->email;
|
||||
$userstatic->gender=$obj->gender;
|
||||
$userstatic->societe_id=$obj->fk_soc;
|
||||
$userstatic->firstname=$obj->firstname;
|
||||
$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].">";
|
||||
if (! empty($arrayfields['u.login']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
print $li;
|
||||
if (! empty($conf->multicompany->enabled) && $obj->admin && ! $obj->entity)
|
||||
{
|
||||
print img_picto($langs->trans("SuperAdministrator"),'redstar');
|
||||
}
|
||||
else if ($obj->admin)
|
||||
{
|
||||
print img_picto($langs->trans("Administrator"),'star');
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.lastname']['checked']))
|
||||
{
|
||||
print '<td>'.$obj->lastname.'</td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.firstname']['checked']))
|
||||
{
|
||||
print '<td>'.$obj->firstname.'</td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.gender']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
if ($obj->gender) print $langs->trans("Gender".$obj->gender);
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.employee']['checked']))
|
||||
{
|
||||
print '<td>'.yn($obj->employee).'</td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.accountancy_code']['checked']))
|
||||
{
|
||||
print '<td>'.$obj->accountancy_code.'</td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.email']['checked']))
|
||||
{
|
||||
print '<td>'.$obj->email.'</td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.fk_soc']['checked']))
|
||||
{
|
||||
print "<td>";
|
||||
if ($obj->fk_soc)
|
||||
{
|
||||
$companystatic->id=$obj->fk_soc;
|
||||
$companystatic->name=$obj->name;
|
||||
$companystatic->canvas=$obj->canvas;
|
||||
print $companystatic->getNomUrl(1);
|
||||
}
|
||||
else if ($obj->ldap_sid)
|
||||
{
|
||||
print $langs->trans("DomainUser");
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("InternalUser");
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
// Multicompany enabled
|
||||
if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode))
|
||||
{
|
||||
if (! empty($arrayfields['u.entity']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
if (! $obj->entity)
|
||||
{
|
||||
print $langs->trans("AllEntities");
|
||||
}
|
||||
else
|
||||
{
|
||||
// $mc is defined in conf.class.php if multicompany enabled.
|
||||
if (is_object($mc))
|
||||
{
|
||||
$mc->getInfo($obj->entity);
|
||||
print $mc->label;
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
// Supervisor
|
||||
if (! empty($arrayfields['u.fk_user']['checked']))
|
||||
{
|
||||
// Resp
|
||||
print '<td class="nowrap">';
|
||||
if ($obj->login2)
|
||||
{
|
||||
$user2->id=$obj->id2;
|
||||
$user2->login=$obj->login2;
|
||||
$user2->lastname=$obj->lastname2;
|
||||
$user2->firstname=$obj->firstname2;
|
||||
$user2->gender=$obj->gender2;
|
||||
$user2->photo=$obj->photo2;
|
||||
$user2->admin=$obj->admin2;
|
||||
$user2->email=$obj->email2;
|
||||
$user2->societe_id=$obj->fk_soc2;
|
||||
print $user2->getNomUrl(-1,'',0,0,24,0,'');
|
||||
if (! empty($conf->multicompany->enabled) && $obj->admin2 && ! $obj->entity2)
|
||||
{
|
||||
print img_picto($langs->trans("SuperAdministrator"),'redstar');
|
||||
}
|
||||
else if ($obj->admin2)
|
||||
{
|
||||
print img_picto($langs->trans("Administrator"),'star');
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Date last login
|
||||
if (! empty($arrayfields['u.datelastlogin']['checked']))
|
||||
{
|
||||
print '<td class="nowrap" align="center">'.dol_print_date($db->jdate($obj->datelastlogin),"dayhour").'</td>';
|
||||
}
|
||||
// Date previous login
|
||||
if (! empty($arrayfields['u.datepreviouslogin']['checked']))
|
||||
{
|
||||
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)
|
||||
{
|
||||
if (! empty($arrayfields["ef.".$key]['checked']))
|
||||
{
|
||||
print '<td';
|
||||
$align=$extrafields->getAlignFlag($key);
|
||||
if ($align) print ' align="'.$align.'"';
|
||||
print '>';
|
||||
$tmpkey='options_'.$key;
|
||||
print $extrafields->showOutputField($key, $obj->$tmpkey, '', 1);
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
}
|
||||
// Fields from hook
|
||||
$parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
if (! empty($arrayfields['u.datec']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print dol_print_date($db->jdate($obj->date_creation), 'dayhour');
|
||||
print '</td>';
|
||||
}
|
||||
// Date modification
|
||||
if (! empty($arrayfields['u.tms']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print dol_print_date($db->jdate($obj->date_update), 'dayhour');
|
||||
print '</td>';
|
||||
}
|
||||
// Status
|
||||
if (! empty($arrayfields['u.statut']['checked']))
|
||||
{
|
||||
$userstatic->statut=$obj->statut;
|
||||
print '<td align="center">'.$userstatic->getLibStatut(3).'</td>';
|
||||
}
|
||||
// Action column
|
||||
print '<td></td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
print "</table>";
|
||||
print "</form>\n";
|
||||
$db->free($result);
|
||||
>>>>>>> branch '4.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
}
|
||||
|
||||
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user