dolibarr 24.0.0-beta
header_login.tpl.php
1<?php
6// Protection to avoid direct call of template
7if (empty($context) || !is_object($context)) {
8 print "Error, template page can't be called as URL";
9 exit(1);
10}
11
12global $langs;
13
14
15// Return HTTP headers
17?>
18<!-- file header_login.tpl.php -->
19<?php
20// Return HTML header
21?>
22<!DOCTYPE html>
23<?php print '<html lang="'.substr($langs->defaultlang, 0, 2) . '">'."\n"; ?>
24<head>
25 <meta charset="UTF-8">
26 <meta name="viewport" content="width=device-width, initial-scale=1.0">
27 <meta http-equiv="X-UA-Compatible" content="ie=edge">
28 <title>
29 <?php
30 if (!empty($context->title)) {
31 print $context->title;
32 } else {
33 print 'WebPortal';
34 }
35 ?>
36 </title>
37 <link rel="stylesheet" href="<?php print $context->rootUrl.'css/style.css.php'; ?>">
38 <link rel="stylesheet" href="<?php print $context->rootUrl.'css/themes/custom.css.php'; ?>">
39
40 <link rel="stylesheet" href="<?php print dirname($context->rootUrl).'/theme/common/fontawesome-5/css/all.min.css?layout=classic'; ?>">
41 <?php
42 //$jNotifyCSSUrl = $context->rootUrl.'public/includes/jquery/plugins/jnotify/jquery.jnotify.css';
43 //$jNotifyCSSUrl = dol_buildpath('/public/includes/jquery/plugins/jnotify/jquery.jnotify.min.css', 2);
44 $jNotifyCSSUrl = dirname($context->rootUrl).'/public/includes/jquery/plugins/jnotify/jquery.jnotify.min.css?layout=classic';
45 print '<link rel="stylesheet" href="'.$jNotifyCSSUrl.' ">'."\n";
46
47 // JQuery
48 //$jQueryJSUrl = $context->rootUrl.'public/includes/jquery/js/jquery.js';
49 //$jQueryJSUrl = dol_buildpath('/public/includes/jquery/js/jquery.js', 2);
50 $jQueryJSUrl = dirname($context->rootUrl).'/public/includes/jquery/js/jquery.min.js';
51 print '<script src="'.$jQueryJSUrl.'"></script>'."\n";
52
53 // JNotify
54 //$jNotifyJSUrl = $context->rootUrl.'public/includes/jquery/plugins/jnotify/jquery.jnotify.js';
55 //$jNotifyJSUrl = dol_buildpath('/public/includes/jquery/plugins/jnotify/jquery.jnotify.min.js', 2);
56 $jNotifyJSUrl = dirname($context->rootUrl).'/public/includes/jquery/plugins/jnotify/jquery.jnotify.min.js';
57 print '<script src="'.$jNotifyJSUrl.'"></script>'."\n";
58
59 $bodyClass = [
60 'login-page'
61 ];
62
63 $loginFormTheme = getDolGlobalString('WEBPORTAL_LOGIN_FORM_THEME', 'default');
64 if (!empty($loginFormTheme)) {
65 $loginFormTheme = mb_strtolower($loginFormTheme, 'UTF-8');
66 // Replace spaces and consecutive whitespace with a single dash
67 $loginFormTheme = preg_replace('/\s+/', '-', $loginFormTheme);
68 // Remove all characters except letters, numbers, dash and underscore
69 $loginFormTheme = preg_replace('/[^a-z0-9\-_]/', '', $loginFormTheme);
70 // Remove leading or trailing dash/underscore
71 $loginFormTheme = trim($loginFormTheme, '-_');
72
73 $bodyClass[] = 'login-form-'.$loginFormTheme;
74 }
75
76 $langs->load("main", 0, 1);
77 $bodyClass[] = ($langs->trans("DIRECTION") == 'rtl' ? 'direction-rtl' : 'direction-ltr');
78
79 // TODO add HOOK here to allow customise headers add body class
80
81 ?>
82</head>
83<body class="<?php print dolPrintHTMLForAttribute(implode(' ', $bodyClass)) ?>">
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.
$context
@method int call_trigger(string $triggerName, ?User $user)
Definition logout.php:42
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:133