270 lines
11 KiB
PHP
Executable File
270 lines
11 KiB
PHP
Executable File
<?php
|
|
$maintenance = $societeusersaas['maintenance'];
|
|
if($maintenance=='1')
|
|
{
|
|
$msgErreur = 'Site en maintenance, veuillez vous reconnecter plus tard!';
|
|
}
|
|
?>
|
|
|
|
<!-- Tableau desktop (affiché sur les écrans moyens et grands) -->
|
|
<div class="d-none d-md-block">
|
|
<span class="login100-form-title" style="font-family: Play-Bold; color:#e5e5e5; margin-top: 5px; margin-bottom:10px;">
|
|
Portail Assuré
|
|
</span>
|
|
|
|
<?php if (isset($msgErreur) and $msgErreur>" "): ?>
|
|
<div class="text-center p-t-10">
|
|
<h4 class="txt3">
|
|
<div class="col-12 alert alert-danger">
|
|
<?= $msgErreur ?>
|
|
</div>
|
|
</h4>
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="text-center p-t-10" id="div_msgErreur">
|
|
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if($maintenance!='1'): ?>
|
|
<div class="wrap-input100">
|
|
<label for="langue">Langue</label>
|
|
<select class="form-select" id="langue" name="langue"
|
|
|
|
required autocomplete="off" onchange="javascript:changer_langue_connexion();">
|
|
<?php liste_options($langues, $_SESSION['lang'], true); ?>
|
|
</select>
|
|
</div>
|
|
|
|
|
|
<div class="wrap-input100">
|
|
<div class="wrap-input100 validate-input" data-validate="Enter Entity">
|
|
<label for="codeSociete">Entité</label>
|
|
<input class="input100" type="text" name="codeSociete" id="codeSociete" value="<?= $codeSociete ?>"
|
|
placeholder="Entité" style="text-align:center;" required AUTOCOMPLETE="off"
|
|
onChange="javascript:changer_entite_portail();" >
|
|
</div>
|
|
</div>
|
|
|
|
<div id="div_login_portail" class="wrap-input100">
|
|
<div class="wrap-input100 validate-input" data-validate="Enter username">
|
|
<label for="login">Identifiant</label>
|
|
<input class="input100" type="text" name="login" id="login" value="<?= $codeUtilisateur ?>" placeholder="Identifiant" style="text-align:center;" required AUTOCOMPLETE="off">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="wrap-input100 validate-input" data-validate="Enter password">
|
|
<label for="mdp">Mot de passe</label>
|
|
<input class="input100" type="password" name="mdp" id="mdp" placeholder="Mot de passe" style="text-align:center;" required AUTOCOMPLETE="off">
|
|
</div>
|
|
|
|
<div class="container-login100-form-btn">
|
|
<button name="btn_connexion" id="btn_connexion" class="btn login-btn">
|
|
Connexion
|
|
</button>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
Tous droits réservés <a href="https://www.ebene.info/">© EBENE SOLUTIONS INFORMATIQUES</a>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<!-- Affichage mobile (cartes) -->
|
|
<div class="d-md-none">
|
|
<!-- VERSION MOBILE SIMPLE ET PROPRE -->
|
|
|
|
<span class="login100-form-title" style="font-family: Play-Bold; color:#e5e5e5; margin-top: 5px; margin-bottom:15px; display: block; text-align: center; font-size: 20px;">
|
|
Portail Assuré
|
|
</span>
|
|
|
|
<?php if (isset($msgErreur) and $msgErreur>" "): ?>
|
|
<div class="text-center p-t-10" style="margin-bottom: 15px;">
|
|
<h4 class="txt3">
|
|
<div class="col-12 alert alert-danger" style="padding: 10px; font-size: 13px; border-radius: 8px;">
|
|
<?= $msgErreur ?>
|
|
</div>
|
|
</h4>
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="text-center p-t-10" id="div_msgErreur" style="margin-bottom: 15px;"></div>
|
|
<?php endif; ?>
|
|
|
|
<?php if($maintenance!='1'): ?>
|
|
|
|
<!-- CONTENEUR MOBILE COMPACT -->
|
|
<div style="width: 100%; max-width: 300px; margin: 0 auto;">
|
|
|
|
<!-- Langue -->
|
|
<div class="wrap-input100" style="margin-bottom: 15px; text-align: center;">
|
|
<label for="langue" style="font-size: 12pt; display: block; margin-bottom: 5px;">Langue</label>
|
|
<select class="form-select" id="langue" name="langue"
|
|
style="width: 100%; height: 40px; border: 2px solid #7D4FFE; border-radius: 9px; background: transparent; font-size: 14px; color: #7D4FFE; text-align: center; padding: 0 10px; box-sizing: border-box;"
|
|
required autocomplete="off" onchange="changer_langue_connexion();">
|
|
<?php liste_options($langues, $_SESSION['lang'], true); ?>
|
|
</select>
|
|
</div>
|
|
|
|
<!-- Entité -->
|
|
<div class="wrap-input100" style="margin-bottom: 15px; text-align: center;">
|
|
<div class="wrap-input100 validate-input">
|
|
<label for="codeSociete" style="font-size: 12pt; display: block; margin-bottom: 5px;">Entité</label>
|
|
<input class="input100" type="text" name="codeSociete" id="codeSociete" value="<?= $codeSociete ?>"
|
|
placeholder="Entité"
|
|
style="width: 100%; height: 40px; border: 2px solid #7D4FFE; border-radius: 9px; color: #7D4FFE; text-align: center; padding: 0 10px; box-sizing: border-box;"
|
|
required AUTOCOMPLETE="off" onChange="changer_entite_portail();">
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Identifiant -->
|
|
<div id="div_login_portail" class="wrap-input100" style="margin-bottom: 15px; text-align: center;">
|
|
<div class="wrap-input100 validate-input">
|
|
<label for="login" style="font-size: 12pt; display: block; margin-bottom: 5px;">Identifiant</label>
|
|
<input class="input100" type="text" name="login" id="login" value="<?= $codeUtilisateur ?>"
|
|
placeholder="Identifiant"
|
|
style="width: 100%; height: 40px; border: 2px solid #7D4FFE; border-radius: 9px; color: #7D4FFE; text-align: center; padding: 0 10px; box-sizing: border-box;"
|
|
required AUTOCOMPLETE="off">
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Mot de passe -->
|
|
<div class="wrap-input100 validate-input" style="margin-bottom: 20px; text-align: center;">
|
|
<label for="mdp" style="font-size: 12pt; display: block; margin-bottom: 5px;">Mot de passe</label>
|
|
<input class="input100" type="password" name="mdp" id="mdp" placeholder="Mot de passe"
|
|
style="width: 100%; height: 40px; border: 2px solid #7D4FFE; border-radius: 9px; color: #7D4FFE; text-align: center; padding: 0 10px; box-sizing: border-box;"
|
|
required AUTOCOMPLETE="off">
|
|
</div>
|
|
|
|
<!-- Bouton Connexion -->
|
|
<div class="container-login100-form-btn" style="margin-bottom: 20px; text-align: center;">
|
|
<button name="btn_connexion" id="btn_connexion" class="btn login-btn"
|
|
style="width: 100%; height: 45px; background: #7D4FFE; color: white; font-size: 16px; font-weight: 700; border-radius: 9px; border: none;">
|
|
Connexion
|
|
</button>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Footer mobile -->
|
|
<div class="footer" style="position: relative; bottom: auto; left: auto; font-size: 11px; text-align: center; padding: 10px; width: 100%; margin-top: 10px;">
|
|
Tous droits réservés <a href="https://www.ebene.info/">© EBENE SOLUTIONS INFORMATIQUES</a>
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<!-- STYLES MINIMALISTES POUR MOBILE -->
|
|
<style>
|
|
/* SEULEMENT POUR MOBILE - NE PAS TOUCHER AU DESKTOP */
|
|
@media screen and (max-width: 767px) {
|
|
/* Force l'affichage correct du conteneur mobile */
|
|
.d-md-none {
|
|
width: 100% !important;
|
|
max-width: 100% !important;
|
|
overflow: hidden !important;
|
|
display: block !important;
|
|
padding: 10px !important;
|
|
box-sizing: border-box !important;
|
|
}
|
|
|
|
/* Les champs mobiles ont tous la même largeur */
|
|
.d-md-none input,
|
|
.d-md-none select,
|
|
.d-md-none .login-btn {
|
|
width: 100% !important;
|
|
max-width: 300px !important;
|
|
margin: 0 auto !important;
|
|
display: block !important;
|
|
}
|
|
|
|
/* Harmonisation des hauteurs et styles */
|
|
.d-md-none input,
|
|
.d-md-none select {
|
|
height: 40px !important;
|
|
font-size: 14px !important;
|
|
border: 2px solid #7D4FFE !important;
|
|
border-radius: 9px !important;
|
|
padding: 0 15px !important;
|
|
box-sizing: border-box !important;
|
|
}
|
|
|
|
/* Bouton avec même largeur */
|
|
.d-md-none .login-btn {
|
|
width: 100% !important;
|
|
max-width: 300px !important;
|
|
height: 45px !important;
|
|
}
|
|
|
|
/* Labels centrés */
|
|
.d-md-none label {
|
|
text-align: center !important;
|
|
display: block !important;
|
|
width: 100% !important;
|
|
}
|
|
|
|
/* Conteneur pour centrer tout */
|
|
.d-md-none > div:last-child {
|
|
width: 100% !important;
|
|
max-width: 300px !important;
|
|
margin: 0 auto !important;
|
|
}
|
|
|
|
/* Footer mobile */
|
|
.d-md-none .footer {
|
|
position: relative !important;
|
|
width: 100% !important;
|
|
text-align: center !important;
|
|
margin-top: 20px !important;
|
|
padding: 10px 0 !important;
|
|
}
|
|
|
|
/* Sur très petits écrans */
|
|
@media screen and (max-width: 320px) {
|
|
.d-md-none input,
|
|
.d-md-none select,
|
|
.d-md-none .login-btn {
|
|
max-width: 280px !important;
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Sur desktop, cacher la version mobile */
|
|
@media screen and (min-width: 768px) {
|
|
.d-md-none {
|
|
display: none !important;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
// JavaScript simple pour mobile - utilise les mêmes IDs que desktop
|
|
// donc les fonctions existantes fonctionnent directement
|
|
|
|
// Vérifier que tout est bien centré sur mobile
|
|
function ajusterMobile() {
|
|
if (window.innerWidth <= 767) {
|
|
// Centrer tous les éléments
|
|
const elements = document.querySelectorAll('.d-md-none input, .d-md-none select, .d-md-none .login-btn');
|
|
elements.forEach(el => {
|
|
el.style.marginLeft = 'auto';
|
|
el.style.marginRight = 'auto';
|
|
el.style.display = 'block';
|
|
});
|
|
|
|
// S'assurer que les labels sont centrés
|
|
const labels = document.querySelectorAll('.d-md-none label');
|
|
labels.forEach(label => {
|
|
label.style.textAlign = 'center';
|
|
label.style.display = 'block';
|
|
label.style.width = '100%';
|
|
});
|
|
}
|
|
}
|
|
|
|
// Exécuter au chargement et au redimensionnement
|
|
document.addEventListener('DOMContentLoaded', ajusterMobile);
|
|
window.addEventListener('resize', ajusterMobile);
|
|
|
|
// Pour le bouton de connexion - même ID que desktop donc même fonction
|
|
// Pas besoin de code supplémentaire
|
|
</script>
|