26 include_once DOL_DOCUMENT_ROOT.
'/core/boxes/modules_boxes.php';
33 public $boxcode =
"lastlogin";
34 public $boximg =
"object_user";
35 public $boxlabel =
'BoxLoginInformation';
36 public $depends = array(
"user");
46 public $info_box_head = array();
47 public $info_box_contents = array();
71 global $conf, $user, $langs;
73 $textHead = $langs->trans(
"BoxLoginInformation");
74 $this->info_box_head = array(
80 $this->info_box_contents[$line][0] = array(
81 'td' =>
'class="tdoverflowmax150 maxwidth150onsmartphone"',
82 'text' => $langs->trans(
"User"),
84 $this->info_box_contents[$line][1] = array(
85 'td' =>
'class="tdoverflowmax150 maxwidth150onsmartphone"',
86 'text' => $user->getNomUrl(-1),
91 $this->info_box_contents[$line][0] = array(
93 'text' => $langs->trans(
"PreviousConnexion"),
95 if ($user->datepreviouslogin) {
96 $tmp =
dol_print_date($user->datepreviouslogin,
"dayhour",
'tzuserrel');
98 $tmp = $langs->trans(
"Unknown");
100 $this->info_box_contents[$line][1] = array(
115 public function showBox($head =
null, $contents =
null, $nooutput = 0)
117 return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
Class to manage the box of last login.
loadBox($max=5)
Charge les donnees en memoire pour affichage ulterieur.
showBox($head=null, $contents=null, $nooutput=0)
Method to show box.
__construct($db, $param)
Constructor.
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
$conf db
API class for accounts.