30if (!defined(
'NOCSRFCHECK')) {
31 define(
'NOCSRFCHECK', 1);
33if (!defined(
'NOTOKENRENEWAL')) {
34 define(
'NOTOKENRENEWAL', 1);
37if (!defined(
'NOREQUIREMENU')) {
38 define(
'NOREQUIREMENU', 1);
41require_once
'../main.inc.php';
44 $langs->setDefaultLang(
GETPOST(
'lang',
'aZ09'));
49$right = ($langs->trans(
"DIRECTION") ==
'rtl' ?
'left' :
'right');
50$left = ($langs->trans(
"DIRECTION") ==
'rtl' ?
'right' :
'left');
57$title = $langs->trans(
"Info");
60$head =
'<!-- Info user page -->'.
"\n";
63top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
68print
'<div style="padding: 20px;">';
72$appli = constant(
'DOL_APPLICATION_TITLE');
74 $appli = $conf->global->MAIN_APPLICATION_TITLE;
75 if (preg_match(
'/\d\.\d/', $appli)) {
76 if (!preg_match(
'/'.preg_quote(DOL_VERSION).
'/', $appli)) {
77 $appli .=
" (".DOL_VERSION.
")";
80 $appli .=
" ".DOL_VERSION;
83 $appli .=
" ".DOL_VERSION;
87 $appli .=
"<br>".$langs->trans(
"LevelOfFeature").
': '.
getDolGlobalInt(
'MAIN_FEATURES_LEVEL');
93 if ($_SESSION[
"dol_authmode"] !=
'forceuser' && $_SESSION[
"dol_authmode"] !=
'http') {
94 $logouthtmltext .= $langs->trans(
"Logout").
'<br>';
96 $logouttext .=
'<a href="'.DOL_URL_ROOT.
'/user/logout.php?token='.newToken().
'">';
98 $logouttext .=
'<span class="fa fa-sign-out atoplogin"></span>';
99 $logouttext .=
'</a>';
101 $logouthtmltext .= $langs->trans(
"NoLogoutProcessWithAuthMode", $_SESSION[
"dol_authmode"]);
102 $logouttext .=
img_picto($langs->trans(
'Logout').
":".$langs->trans(
'Logout'),
'logout_top.png',
'class="login"', 0, 0, 1);
106print
'<div class="login_block_getinfo">'.
"\n";
109$toprightmenu .=
'<div class="login_block_user">';
113$toprightmenu .=
'<div class="inline-block nowrap"><div class="inline-block login_block_elem login_block_elem_name" style="padding: 0px;">';
114$toprightmenu .= $user->getNomUrl($mode,
'', -1, 0, 11, 0, ($user->firstname ?
'firstname' : -1),
'atoplogin');
115$toprightmenu .=
'</div></div>';
117$toprightmenu .=
'</div>'.
"\n";
119$toprightmenu .=
'<div class="login_block_other">';
122$parameters = array();
123$result = $hookmanager->executeHooks(
'printTopRightMenu', $parameters);
124if (is_numeric($result)) {
125 if (empty($result)) {
126 $toprightmenu .= $hookmanager->resPrint;
128 $toprightmenu = $hookmanager->resPrint;
131 $toprightmenu .= $result;
134if (!isset($form) || !is_object($form)) {
135 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.form.class.php';
136 $form =
new Form($db);
140if (isModEnabled(
'modulebuilder')) {
141 $text =
'<a href="'.DOL_URL_ROOT.
'/modulebuilder/index.php?mainmenu=home&leftmenu=admintools" target="modulebuilder">';
143 $text .=
'<span class="fa fa-bug atoplogin"></span>';
145 $toprightmenu .= $form->textwithtooltip(
'', $langs->trans(
"ModuleBuilder"), 2, 1, $text,
'login_block_elem', 2);
210if (
GETPOST(
'withlogout',
'int')) {
211 $toprightmenu .= $form->textwithtooltip(
'', $logouthtmltext, 2, 1, $logouttext,
'login_block_elem', 2);
214$toprightmenu .=
'</div>';
221print
'</body></html>'.
"\n";
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs=array(), $arrayofcss=array(), $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Ouput html header of a page.