| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424 |
- <?php
- /*
- Sistema de Portales de Soler y Palau SA de CV
- (2021) Desarrollos y Servicios en Tecnología Inteligente S de RL de CV
- Versión 1.0
- Última Actualización: 05/08/2021
- Código del Módulo: GBL001
- */
- $strModulo = 'GBL001';
- /*require_once('shared/conexionBaseDatos.php');
- require_once('shared/conexionBaseDatosCtl.php');
- require_once('shared/encriptacion.php');
- require_once('shared/iniciaSesion.php');
- require_once('shared/funciones.php');*/
- $bolErrorLogin = false; // Predefine que no hay error para el login
- $bolErrorApp = false; // Predefine que no hay errores para la aplicación
- $bolBloqueo = false; // Predefine que no hay bloqueos de acceso por Usuario / IP
- $bolSinPerfil = false; // Predefine que no se rechaza el acceso por falta de Perfiles asociados
- if((!empty($_POST['usuario'])) && (!empty($_POST['contrasena'])) && (!$bolErrorApp) && (!$bolBloqueo)) {
- $user = trim($_POST['usuario']);
- $contra = trim($_POST['contrasena']);
- if((intval($user) == 10) && ($contra == 'admin')){
- $q = '';
- header('Location: acceso.php'.$q);
- exit;
- }else{
- $bolErrorLogin = true;
- goto fin;
- }
- }
- // Destruye cualquier sesión existente para el usuario
- //session_destroy();
- // Si se disparó un error por Perfil impide que se dispare simultáneamente un error de Aplicación
- if($bolSinPerfil==true) { $bolErrorApp == false; }
- // Si se recibió un parámetro de acceso directo, lo mantiene vivo dentro de la petición.
- /*if(!empty($_GET['q'])) {
- $q = $_SERVER['PHP_SELF'].'?q='.urlencode($_GET['q']);
- } elseif(!empty($_GET['p'])) { // Para Proveedores
- $q = $_SERVER['PHP_SELF'].'?p='.urlencode($_GET['p']);
- }else{
- $q = $_SERVER['PHP_SELF'];
- }*/
- fin :
- $mensajeError = '';
- if($bolBloqueo){
- $mensajeError = '<b>Acceso Bloqueado</b> <br> Contacte al Administrador.';
- }
- if($bolErrorLogin){
- $mensajeError = '<b>Acceso Denegado</b> <br> Usuario o contraseña incorrecto.';
- }
- if($bolErrorApp){
- $mensajeError = '<b>Servicio No Disponible</b> <br> Intente nuevamente más tarde.';
- }
- if($bolSinPerfil){
- $mensajeError = '<b>El usuario no tiene Perfiles relacionados</b>';
- }
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta http-equiv="imagetoolbar" content="no" />
- <title>Bienvenido al Smart Portal de S&P</title>
- <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Poppins:400,500,700,300,600">
- <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans">
- <!-- <link media="screen" rel="stylesheet" type="text/css" href="css/admin-login.css" /> -->
- <link rel="shortcut icon" type="image/x-icon" href="css/layout/global/sp.ico" />
- <meta name="viewport" content="width=device-width, user-scalable=yes">
- <!-- <meta name="theme-color" content="#dc3545"> -->
- <meta name="theme-color" content="#EC161E">
- <link rel="stylesheet" href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/vivify.min.css">
- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.0/css/bootstrap.min.css">
- <link href="https://fonts.googleapis.com/icon?family=Material+Icons"
- rel="stylesheet">
- <script type="text/JavaScript" src="js/front.js"></script>
- <script type="text/JavaScript">if(top.location != self.location)top.location = self.location;</script>
- <script>
- function crearIframe(){
- var link = "lp/mantenimiento.php";
- var iframe = document.createElement('iframe');
- iframe.frameBorder=0;
- iframe.width="100%";
- iframe.height="400px";
- iframe.id="randomid";
- iframe.setAttribute("src", link);
- document.getElementById("iframeIn").appendChild(iframe);
- }
- </script>
- </head>
- <body>
- <!-- header -->
- <div class="container-fluid">
- <div class="row">
- <nav class="navbar navbar-light bg-white col-sm-12">
- <div class="col-sm-6 col-9">
- <a class="navbar-brand" href="#">
- <img src="css/layout/global/header_logo_1.png" width="245" class="align-top mb-2 img-fluid" alt="S&P Mexico">
- </a>
- </div>
- <div class="col-sm-6 col-6 d-none d-sm-block">
- <a class="form-inline float-right" href="#">
- <img src="css/layout/global/SPA861201DK4_PDF.jpg" width="100" class="img-fluid" alt="Soler Y Palau Ventilation Group">
- </a>
- </div>
- </nav>
- </div>
- <div class="row">
- <div class="barra-roja">
- <div id="titulo"> Planta S&P </div>
- </div>
- </div>
- </div>
- <!-- body section -->
- <div class="container">
- <div id="iframeIn"></div>
- <div class="col-12 col-sm-9 col-md-7 col-lg-5 col-xl-4 mx-auto" id="login">
- <div class="card card-signin my-2 vivify animationObject popInTop">
- <div class="card-body">
- <h4 class="card-title text-center mb-2">Iniciar Sesión</h4>
- <form class="form-signin" action="index.php"
- onsubmit=""
- method="POST">
- <div class="form-label-group">
- <input type="text" id="inputUser" name="usuario" class="form-control" placeholder=""
- required autofocus="">
- <label for="inputUser">
- <i class="material-icons" style="vertical-align: middle;">person</i>
- Usuario
- </label>
- </div>
- <div class="form-label-group">
- <input type="password" id="inputPassword" name="contrasena" class="form-control"
- placeholder="" required>
- <label for="inputPassword">
- <i class="material-icons" style="vertical-align: middle;">lock</i>
- Contraseña</label>
- </div>
- <div class="vivify animationObject shake m-1 text-center"
- <?php if ($mensajeError === ''): ?>
- style="display:none;background: "
- <?php endif; ?>
- >
- <label class="text-dark text-center">
- <?php echo $mensajeError; ?>
- </label>
- </div>
- <button class="btn btn-lg btn-danger btn-block" type="submit">ACCEDER</button>
- </form>
- </div>
- </div>
- </div>
- </div>
- <!-- footer -->
- <div class="container-fluid">
- <div class="row">
- <footer class="text-left">
- <label class="ml-2">
- Copyright © <?php echo date('Y'); ?> <b class="font-weight-bold">S&P México.</b> Todos los derechos reservados.
- </label>
- <label class="footer_terminos">
- <a class="text-white" href="http://www.soler-palau.mx/terminos-condiciones.php" target="_new"> Términos y Condiciones</a>
- <a class="text-white" href="http://www.soler-palau.mx/politicas-privacidad.php" target="_new"> | Políticas de Privacidad</a>
- <a class="text-white" href="http://www.soler-palau.mx/aviso-privacidad.php" target="_new"> | Aviso de Privacidad</a>
- </label>
- </footer>
- </div>
- </div>
- <!-- modals aviso -->
- <div class="modal fade bd-example-modal-lg" id="modal-aviso" tabindex="-1" role="dialog" aria-labelledby="modal-aviso" aria-hidden="true">
- <div class="modal-dialog modal-lg">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="cursor: pointer;">
- <span aria-hidden="true">×</span>
- </button>
- <div class="modal-content p-4">
- <img class="img-fluid" src="https://sportalsolerpalau.mx/portalsp/Avisos/AVISOCXC.png">
- </div>
- </div>
- </div>
- </body>
- <!-- <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script> -->
- <!-- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" ></script> -->
- <script>
- // modal aviso
- // $('#modal-aviso').modal('show');
- </script>
- </html>
- <style>
- :root {
- --input-padding-x: 1.6rem;
- --input-padding-y: .75rem;
- }
- .barra-roja {
- background-image: url("css/layout/login/wrapper_bg.gif");
- height: 80px;
- width: 100%;
- }
- #titulo {
- height: 40px;
- width: auto;
- color: #fff;
- font-family: Poppins, Helvetica, sans-serif;
- font-size: 30px;
- font-weight: 200;
- line-height: 40px;
- text-align: right;
- padding-right: 20px;
- padding-top: 15px;
- }
- #login {
- margin-top: 2rem;
- }
- footer {
- border-top: 8px solid #D6D4D4;
- background-color: #333;
- position: absolute;
- bottom: 0;
- width: 100%;
- height: 52px;
- color: white;
- font-size: 12px;
- font-weight: 300;
- font-family: 'Open Sans', sans-serif;
- line-height: 24px;
- padding: 8px;
- }
- .btn-danger {
- color: #fff;
- background-color: #ec161e;
- border-color: #ec161e;
- }
- .card-signin {
- border: 2px solid #f90000;
- border-radius: 1rem;
- box-shadow: 0 0.3rem 0.2rem 0 rgba(101, 101, 101, 0.75);
- }
- .card-signin .card-body {
- padding: 2rem;
- }
- .form-signin {
- width: 100%;
- }
- .form-signin .btn {
- font-size: 90%;
- border-radius: 5rem;
- letter-spacing: .1rem;
- font-weight: bold;
- padding: 0.6rem;
- transition: all 0.2s;
- }
- .form-label-group {
- position: relative;
- margin-bottom: 1rem;
- }
- .form-label-group input {
- height: auto;
- border-radius: 2rem;
- }
- .form-label-group > input,
- .form-label-group > label {
- padding: var(--input-padding-y) var(--input-padding-x);
- }
- .form-label-group input:not(:placeholder-shown) ~ label > i {
- font-size: 11px;
- }
- .form-label-group > label {
- position: absolute;
- top: 0;
- left: 0;
- display: block;
- width: 100%;
- margin-bottom: 0;
- /* Override default `<label>` margin */
- line-height: 1.5;
- color: #495057;
- border: 1px solid transparent;
- border-radius: .25rem;
- transition: all .1s ease-in-out;
- }
- .form-label-group input::-webkit-input-placeholder {
- color: transparent;
- }
- .form-label-group input:-ms-input-placeholder {
- color: transparent;
- }
- .form-label-group input::-ms-input-placeholder {
- color: transparent;
- }
- .form-label-group input::-moz-placeholder {
- color: transparent;
- }
- .form-label-group input::placeholder {
- color: transparent;
- }
- .form-label-group input:not(:placeholder-shown) {
- padding-top: calc(var(--input-padding-y) + var(--input-padding-y) * (2 / 3));
- padding-bottom: calc(var(--input-padding-y) / 3);
- }
- .form-label-group input:not(:placeholder-shown) ~ label {
- padding-top: calc(var(--input-padding-y) / 3);
- padding-bottom: calc(var(--input-padding-y) / 3);
- font-size: 12px;
- color: #777;
- }
- /* Fallback for all
- -------------------------------------------------- */
- @media (min-width: 1500px) {
- #login {
- margin-top: 8rem;
- }
- }
- /* Alto maximo 590*/
- @media (max-height: 590px) {
- footer {
- position: relative;
- }
- }
- @media (max-width: 777px) {
- .footer_terminos {
- display: none;
- }
- footer {
- height: auto;
- }
- }
- /*Pantallas pequeñas*/
- @media (max-width: 540px) {
- #login {
- margin-top: 2rem;
- margin-bottom: 3rem;
- }
- }
- /* Fallback for Edge
- -------------------------------------------------- */
- @supports (-ms-ime-align: auto) {
- .form-label-group > label {
- display: none;
- }
- .form-label-group input::-ms-input-placeholder {
- color: #777;
- }
- }
- /* Fallback for IE
- -------------------------------------------------- */
- @media all and (-ms-high-contrast: none),
- (-ms-high-contrast: active) {
- .form-label-group > label {
- display: none;
- }
- .form-label-group input:-ms-input-placeholder {
- color: #777;
- }
- }
- </style>
|