PageRenderTime 43ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/htdocs/theme/bureau2crea/tpl/login.tpl.php

https://github.com/asterix14/dolibarr
PHP | 185 lines | 139 code | 26 blank | 20 comment | 18 complexity | 060b1764a05d31ff8a0a56e6e66c01ce MD5 | raw file
Possible License(s): LGPL-2.0
  1. <?php
  2. /* Copyright (C) 2009-2010 Regis Houssin <regis@dolibarr.fr>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. *
  17. */
  18. header('Cache-Control: Public, must-revalidate');
  19. header("Content-type: text/html; charset=".$conf->file->character_set_client);
  20. ?>
  21. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  22. <!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -->
  23. <!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -->
  24. <!-- <!DOCTYPE html> -->
  25. <!-- Ce DTD est KO car inhibe document.body.scrollTop -->
  26. <!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -->
  27. <!-- BEGIN PHP TEMPLATE -->
  28. <html>
  29. <!-- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr"> -->
  30. <head>
  31. <meta name="robots" content="noindex,nofollow" />
  32. <title><?php echo $langs->trans('Login'); ?></title>
  33. <script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/js/jquery-latest.min.js"></script>
  34. <link rel="stylesheet" type="text/css" href="<?php echo $conf_css; ?>" />
  35. <?php echo $conf->global->MAIN_HTML_HEADER ?>
  36. <?php
  37. $favicon=DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/favicon.ico';
  38. ?>
  39. <link rel="shortcut icon" type="image/x-icon" href="<?php echo $favicon; ?>" />
  40. <!-- HTTP_USER_AGENT = <?php echo $_SERVER['HTTP_USER_AGENT']; ?> -->
  41. </head>
  42. <body class="body">
  43. <script type="text/javascript">
  44. jQuery(document).ready(function () {
  45. // Set focus on correct field
  46. <?php if ($focus_element) { ?>jQuery('#<?php echo $focus_element; ?>').focus(); <?php } ?> // Warning to use this only on visible element
  47. // Detect and save TZ and DST
  48. var rightNow = new Date();
  49. var jan1 = new Date(rightNow.getFullYear(), 0, 1, 0, 0, 0, 0);
  50. var temp = jan1.toGMTString();
  51. var jan2 = new Date(temp.substring(0, temp.lastIndexOf(" ")-1));
  52. var std_time_offset = (jan1 - jan2) / (1000 * 60 * 60);
  53. var june1 = new Date(rightNow.getFullYear(), 6, 1, 0, 0, 0, 0);
  54. temp = june1.toGMTString();
  55. var june2 = new Date(temp.substring(0, temp.lastIndexOf(" ")-1));
  56. var daylight_time_offset = (june1 - june2) / (1000 * 60 * 60);
  57. var dst;
  58. if (std_time_offset == daylight_time_offset) {
  59. dst = "0"; // daylight savings time is NOT observed
  60. } else {
  61. dst = "1"; // daylight savings time is observed
  62. }
  63. jQuery('#tz').val(std_time_offset); // returns TZ
  64. jQuery('#dst').val(dst); // returns DST
  65. // Detect and save screen resolution
  66. jQuery('#screenwidth').val(jQuery(window).width()); // returns width of browser viewport
  67. jQuery('#screenheight').val(jQuery(window).height()); // returns width of browser viewport
  68. });
  69. </script>
  70. <form id="login" name="login" method="post" action="<?php echo $php_self; ?>">
  71. <input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
  72. <input type="hidden" name="loginfunction" value="loginfunction" />
  73. <!-- Add fields to send local user information -->
  74. <input type="hidden" name="tz" id="tz" value="" />
  75. <input type="hidden" name="dst" id="dst" value="" />
  76. <input type="hidden" name="screenwidth" id="screenwidth" value="" />
  77. <input type="hidden" name="screenheight" id="screenheight" value="" />
  78. <div id="infoVersion"><?php echo $title; ?></div>
  79. <div id="logoBox">
  80. <img alt="Logo" title="" src="<?php echo $urllogo; ?>" />
  81. </div>
  82. <div id="parameterBox">
  83. <div id="logBox"><strong><label for="username"><?php echo $langs->trans('Login'); ?></label></strong><input type="text" id="username" name="username" class="flat" size="15" maxlength="40" value="<?php echo $login; ?>" tabindex="1" /></div>
  84. <div id="passBox"><strong><label for="password"><?php echo $langs->trans('Password'); ?></label></strong><input id="password" name="password" class="flat" type="password" size="15" maxlength="30" value="<?php echo $password; ?>" tabindex="2" /></div>
  85. <?php if ($select_entity) { ?>
  86. <div><strong><?php echo $langs->trans('Entity'); ?></strong><?php echo $select_entity; ?></div>
  87. <?php } ?>
  88. <?php if ($captcha) { ?>
  89. <div class="captchaBox">
  90. <strong><label><?php echo $langs->trans('SecurityCode'); ?></label></strong>
  91. <input id="securitycode" class="flat" type="text" size="6" maxlength="5" name="code" tabindex="4" />
  92. </div>
  93. <div class="captchaImg">
  94. <img src="<?php echo DOL_URL_ROOT ?>/core/antispamimage.php" border="0" width="128" height="36" id="captcha" />
  95. <a href="<?php echo $php_self; ?>"><?php echo $captcha_refresh; ?></a>
  96. </div>
  97. <?php } ?>
  98. <div id="connectionLine">
  99. <input type="submit" class="button" value="&nbsp; <?php echo $langs->trans('Connection'); ?> &nbsp;" tabindex="5" />
  100. </div>
  101. <?php
  102. if ($forgetpasslink || $helpcenterlink) {
  103. echo '<div class="other">';
  104. if ($forgetpasslink) {
  105. echo '<a style="color: #888888; font-size: 10px" href="'.DOL_URL_ROOT.'/user/passwordforgotten.php">(';
  106. echo $langs->trans('PasswordForgotten');
  107. if (! $helpcenterlink) {
  108. echo ')';
  109. }
  110. echo '</a>';
  111. }
  112. if ($helpcenterlink) {
  113. echo '<a style="color: #888888; font-size: 10px" href="'.DOL_URL_ROOT.'/support/index.php" target="_blank">';
  114. if ($forgetpasslink) {
  115. echo '&nbsp;-&nbsp;';
  116. } else {
  117. echo '(';
  118. }
  119. echo $langs->trans('NeedHelpCenter').')</a>';
  120. }
  121. echo '</div>';
  122. }
  123. ?>
  124. </div>
  125. <?php if ($main_home) { ?>
  126. <div id="infoLogin">
  127. <?php echo $main_home; ?>
  128. </div>
  129. <?php } ?>
  130. <?php if ($_SESSION['dol_loginmesg']) { ?>
  131. <div class="error">
  132. <?php echo $_SESSION['dol_loginmesg']; ?>
  133. </div>
  134. <?php } ?>
  135. <?php
  136. if (! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN_GOOGLE_AD_SLOT))
  137. {
  138. ?>
  139. <div align="center">
  140. <script type="text/javascript"><!--
  141. google_ad_client = "<?php echo $conf->global->MAIN_GOOGLE_AD_CLIENT ?>";
  142. google_ad_slot = "<?php echo $conf->global->MAIN_GOOGLE_AD_SLOT ?>";
  143. google_ad_width = <?php echo $conf->global->MAIN_GOOGLE_AD_WIDTH ?>;
  144. google_ad_height = <?php echo $conf->global->MAIN_GOOGLE_AD_HEIGHT ?>;
  145. //-->
  146. </script>
  147. <script type="text/javascript"
  148. src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  149. </script>
  150. </div>
  151. <?php } ?>
  152. </form>
  153. <!-- authentication mode = <?php echo $main_authentication ?> -->
  154. <!-- cookie name used for this session = <?php echo $session_name ?> -->
  155. <!-- urlfrom in this session = <?php echo $_SESSION["urlfrom"] ?> -->
  156. <?php echo $conf->global->MAIN_HTML_FOOTER; ?>
  157. </body>
  158. </html>
  159. <!-- END PHP TEMPLATE -->