27include_once DOL_DOCUMENT_ROOT.
'/core/boxes/modules_boxes.php';
34 public $boxcode =
"lastlogin";
35 public $boximg =
"object_user";
36 public $boxlabel =
'BoxLoginInformation';
37 public $depends = array(
"user");
62 global
$conf, $user, $langs;
64 $textHead = $langs->trans(
"BoxLoginInformation");
65 $this->info_box_head = array(
71 $this->info_box_contents[$line][0] = array(
72 'td' =>
'class="tdoverflowmax150 maxwidth150onsmartphone"',
73 'text' => $langs->trans(
"User"),
75 $this->info_box_contents[$line][1] = array(
76 'td' =>
'class="tdoverflowmax150 maxwidth150onsmartphone"',
77 'text' => $user->getNomUrl(-1),
82 $this->info_box_contents[$line][0] = array(
84 'text' => $langs->trans(
"PreviousConnexion"),
86 if ($user->datepreviouslogin) {
87 $tmp =
dol_print_date($user->datepreviouslogin,
"dayhour",
'tzuserrel');
89 $tmp = $langs->trans(
"Unknown");
91 $this->info_box_contents[$line][1] = array(
108 public function showBox($head =
null, $contents =
null, $nooutput = 0)
110 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).
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...