31if (!defined(
'NOCSRFCHECK')) {
32 define(
'NOCSRFCHECK', 1);
34if (!defined(
'NOTOKENRENEWAL')) {
35 define(
'NOTOKENRENEWAL', 1);
38if (!defined(
'NOREQUIREMENU')) {
39 define(
'NOREQUIREMENU', 1);
42require_once
'../main.inc.php';
45 $langs->setDefaultLang(
GETPOST(
'lang',
'aZ09'));
50$right = ($langs->trans(
"DIRECTION") ==
'rtl' ?
'left' :
'right');
51$left = ($langs->trans(
"DIRECTION") ==
'rtl' ?
'right' :
'left');
58$title = $langs->trans(
"Info");
61$head =
'<!-- Info user page -->'.
"\n";
64top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
69print
'<div style="padding: 20px;">';
73$appli = constant(
'DOL_APPLICATION_TITLE');
76 if (preg_match(
'/\d\.\d/', $appli)) {
77 if (!preg_match(
'/'.preg_quote(DOL_VERSION).
'/', $appli)) {
78 $appli .=
" (".DOL_VERSION.
")";
81 $appli .=
" ".DOL_VERSION;
84 $appli .=
" ".DOL_VERSION;
88 $appli .=
"<br>".$langs->trans(
"LevelOfFeature").
': '.
getDolGlobalInt(
'MAIN_FEATURES_LEVEL');
96 if ($_SESSION[
"dol_authmode"] !=
'forceuser' && $_SESSION[
"dol_authmode"] !=
'http') {
97 $logouthtmltext .= $langs->trans(
"Logout").
'<br>';
99 $logouttext .=
'<a href="'.DOL_URL_ROOT.
'/user/logout.php?token='.
newToken().
'">';
101 $logouttext .=
'<span class="fa fa-sign-out atoplogin"></span>';
102 $logouttext .=
'</a>';
104 $logouthtmltext .= $langs->trans(
"NoLogoutProcessWithAuthMode", $_SESSION[
"dol_authmode"]);
105 $logouttext .=
img_picto($langs->trans(
'Logout').
":".$langs->trans(
'Logout'),
'logout_top.png',
'class="login"', 0, 0, 1);
109print
'<div class="login_block_getinfo">'.
"\n";
112$toprightmenu .=
'<div class="login_block_user">';
116$toprightmenu .=
'<div class="inline-block nowrap"><div class="inline-block login_block_elem login_block_elem_name" style="padding: 0px;">';
117$toprightmenu .= $user->getNomUrl($picto,
'', -1, 0, 11, 0, ($user->firstname ?
'firstname' : -1),
'atoplogin');
118$toprightmenu .=
'</div></div>';
120$toprightmenu .=
'</div>'.
"\n";
122$toprightmenu .=
'<div class="login_block_other">';
125$parameters = array();
126$result = $hookmanager->executeHooks(
'printTopRightMenu', $parameters);
127if (is_numeric($result)) {
128 if (empty($result)) {
129 $toprightmenu .= $hookmanager->resPrint;
131 $toprightmenu = $hookmanager->resPrint;
134 $toprightmenu .= $result;
137if (!isset($form) || !is_object($form)) {
138 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.form.class.php';
139 $form =
new Form($db);
143if (isModEnabled(
'modulebuilder')) {
144 $text =
'<a href="'.DOL_URL_ROOT.
'/modulebuilder/index.php?mainmenu=home&leftmenu=admintools" target="modulebuilder">';
146 $text .=
'<span class="fa fa-bug atoplogin"></span>';
149 $toprightmenu .= $form->textwithtooltip(
'', $langs->trans(
"ModuleBuilder"), 2, 1, $text,
'login_block_elem', 2);
154 $toprightmenu .= $form->textwithtooltip(
'', $logouthtmltext, 2, 1, $logouttext,
'login_block_elem', 2);
157$toprightmenu .=
'</div>';
164print
'</body></html>'.
"\n";
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
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 a Dolibarr global constant string value.
top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs=array(), $arrayofcss=array(), $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Output html header of a page.