Minor - format code

1.9.x
Julio Montoya 11 years ago
parent caf2a5867d
commit 7a48d2c734
  1. 65
      custompages/index-unlogged.php

@ -1,4 +1,4 @@
<?php <?php
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
/** /**
* Redirect script * Redirect script
@ -7,35 +7,37 @@
/** /**
* Initialization * Initialization
*/ */
//require_once('main/inc/global.inc.php'); //require_once('main/inc/global.inc.php');
require_once('language.php'); require_once('language.php');
/** /**
* Homemade micro-controller * Homemade micro-controller
*/ */
if (isset($_GET['loginFailed'])){ if (isset($_GET['loginFailed'])) {
if (isset($_GET['error'])) { if (isset($_GET['error'])) {
switch ($_GET['error']) { switch ($_GET['error']) {
case 'account_expired': case 'account_expired':
$error_message = custompages_get_lang('AccountExpired'); $error_message = custompages_get_lang('AccountExpired');
break; break;
case 'account_inactive': case 'account_inactive':
$error_message = custompages_get_lang('AccountInactive'); $error_message = custompages_get_lang('AccountInactive');
break; break;
case 'user_password_incorrect': case 'user_password_incorrect':
$error_message = custompages_get_lang('InvalidId'); $error_message = custompages_get_lang('InvalidId');
break; break;
case 'access_url_inactive': case 'access_url_inactive':
$error_message = custompages_get_lang('AccountURLInactive'); $error_message = custompages_get_lang('AccountURLInactive');
break; break;
default : default :
$error_message = custompages_get_lang('InvalidId'); $error_message = custompages_get_lang('InvalidId');
}
} else {
$error_message = get_lang('InvalidId');
} }
} else {
$error_message = get_lang('InvalidId');
}
} }
$rootWeb = api_get_path('WEB_PATH'); $rootWeb = api_get_path('WEB_PATH');
/** /**
* HTML output * HTML output
*/ */
@ -52,14 +54,14 @@ if (isset($_GET['loginFailed'])){
<![endif]--> <![endif]-->
<script type="text/javascript" src="<?php echo $rootWeb ?>main/inc/lib/javascript/jquery.min.js"></script> <script type="text/javascript" src="<?php echo $rootWeb ?>main/inc/lib/javascript/jquery.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
if (top.location != location) if (top.location != location) {
top.location.href = document.location.href ; top.location.href = document.location.href;
}
// Handler pour la touche retour // Handler pour la touche retour
$('input').keyup(function(e) { $('input').keyup(function(e) {
if (e.keyCode == 13) { if (e.keyCode == 13) {
$('#login-form').submit(); $('#login-form').submit();
} }
@ -77,13 +79,15 @@ if (isset($_GET['loginFailed'])){
</div> <!-- #header --> </div> <!-- #header -->
<div id="login-form-box" class="form-box"> <div id="login-form-box" class="form-box">
<div id="login-form-info" class="form-info"> <div id="login-form-info" class="form-info">
<?php if (isset($content['info']) && !empty($content['info'] )) { <?php if (isset($content['info']) && !empty($content['info'])) {
echo $content['info']; echo $content['info'];
}?> }
?>
</div> </div>
<?php if (isset($error_message)) { <?php if (isset($error_message)) {
echo '<div id="login-form-info" class="form-error">'.$error_message.'</div>'; echo '<div id="login-form-info" class="form-error">'.$error_message.'</div>';
}?> }
?>
<form id="login-form" class="form" action="<?php echo api_get_path(WEB_PATH)?>index.php" method="post"> <form id="login-form" class="form" action="<?php echo api_get_path(WEB_PATH)?>index.php" method="post">
<div> <div>
<label for="login">*<?php echo custompages_get_lang('User');?></label> <label for="login">*<?php echo custompages_get_lang('User');?></label>
@ -104,6 +108,5 @@ if (isset($_GET['loginFailed'])){
<img src="<?php echo api_get_path(WEB_PATH)?>/custompages/images/footer.png" /> <img src="<?php echo api_get_path(WEB_PATH)?>/custompages/images/footer.png" />
</div> <!-- #footer --> </div> <!-- #footer -->
</div> <!-- #wrapper --> </div> <!-- #wrapper -->
</body> </body>
</html> </html>

Loading…
Cancel
Save