index-unlogged.php 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?php
  2. //require_once('main/inc/global.inc.php');
  3. require_once('language.php');
  4. if (isset($_GET['loginFailed'])){
  5. if (isset($_GET['error'])) {
  6. switch ($_GET['error']) {
  7. case 'account_expired':
  8. $error_message = cblue_get_lang('AccountExpired');
  9. break;
  10. case 'account_inactive':
  11. $error_message = cblue_get_lang('AccountInactive');
  12. break;
  13. case 'user_password_incorrect':
  14. $error_message = cblue_get_lang('InvalidId');
  15. break;
  16. case 'access_url_inactive':
  17. $error_message = cblue_get_lang('AccountURLInactive');
  18. break;
  19. default :
  20. $error_message = cblue_get_lang('InvalidId');
  21. }
  22. } else {
  23. $error_message = get_lang('InvalidId');
  24. }
  25. }
  26. $rootWeb = api_get_path('WEB_PATH');
  27. ?>
  28. <html>
  29. <head>
  30. <title>Custompage - login</title>
  31. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  32. <!--[if !IE 6]><!-->
  33. <link rel="stylesheet" type="text/css" href="<?php echo $rootWeb ?>custompages/style.css" />
  34. <!--<![endif]-->
  35. <!--[if IE 6]>
  36. <link rel="stylesheet" type="text/css" href="/custompages/style-ie6.css" />
  37. <![endif]-->
  38. <script type="text/javascript" src="<?php echo $rootWeb ?>custompages/jquery-1.5.1.min.js"></script>
  39. <script type="text/javascript">
  40. $(document).ready(function() {
  41. if (top.location != location)
  42. top.location.href = document.location.href ;
  43. // Handler pour la touche retour
  44. $('input').keyup(function(e) {
  45. if (e.keyCode == 13) {
  46. $('#login-form').submit();
  47. }
  48. });
  49. });
  50. </script>
  51. </head>
  52. <body>
  53. <div id="backgroundimage">
  54. <img src="<?php echo api_get_path(WEB_PATH)?>/custompages/images/page-background.png" class="backgroundimage" />
  55. </div>
  56. <div id="wrapper">
  57. <div id="header">
  58. <img src="<?php echo api_get_path(WEB_PATH)?>/custompages/images/header.png" alt="Logo" />
  59. </div> <!-- #header -->
  60. <div id="login-form-box" class="form-box">
  61. <div id="login-form-info" class="form-info">
  62. <?php if (isset($content['info']) && !empty($content['info'] )) {
  63. echo $content['info'];
  64. }?>
  65. </div>
  66. <?php if (isset($error_message)) {
  67. echo '<div id="login-form-info" class="form-error">'.$error_message.'</div>';
  68. }?>
  69. <form id="login-form" class="form" action="<?php echo api_get_path(WEB_PATH)?>index.php" method="post">
  70. <div>
  71. <label for="login">*<?php echo cblue_get_lang('User');?></label>
  72. <input name="login" type="text" /><br />
  73. <label for="password">*<?php echo cblue_get_lang('langPass');?></label>
  74. <input name="password" type="password" /><br />
  75. </div>
  76. </form>
  77. <div id="login-form-submit" class="form-submit" onclick="document.forms['login-form'].submit();">
  78. <span><?php echo cblue_get_lang('LoginEnter');?></span>
  79. </div> <!-- #form-submit -->
  80. <div id="links">
  81. <a href="<?php echo api_get_path(WEB_PATH)?>main/auth/inscription.php"><?php echo cblue_get_lang('langReg')?></a><br />
  82. <a href="<?php echo api_get_path(WEB_PATH)?>main/auth/lostPassword.php"><?php echo cblue_get_lang('langLostPassword')?></a>
  83. </div>
  84. </div> <!-- #form -->
  85. <div id="footer">
  86. <img src="<?php echo api_get_path(WEB_PATH)?>/custompages/images/footer.png" />
  87. </div> <!-- #footer -->
  88. </div> <!-- #wrapper -->
  89. </body>
  90. </html>