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");
61 global $conf, $user, $langs;
63 $textHead = $langs->trans(
"BoxLoginInformation");
64 $this->info_box_head = array(
70 $this->info_box_contents[$line][0] = array(
71 'td' =>
'class="tdoverflowmax150 maxwidth150onsmartphone"',
72 'text' => $langs->trans(
"User"),
74 $this->info_box_contents[$line][1] = array(
75 'td' =>
'class="tdoverflowmax150 maxwidth150onsmartphone"',
76 'text' => $user->getNomUrl(-1),
81 $this->info_box_contents[$line][0] = array(
83 'text' => $langs->trans(
"PreviousConnexion"),
85 if ($user->datepreviouslogin) {
86 $tmp =
dol_print_date($user->datepreviouslogin,
"dayhour",
'tzuserrel');
88 $tmp = $langs->trans(
"Unknown");
90 $this->info_box_contents[$line][1] = array(
105 public function showBox($head =
null, $contents =
null, $nooutput = 0)
107 return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
Class to manage the box of last login.
loadBox($max=5)
Load data into memory for later display.
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=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).