MINI MINI MANI MO
{{--<meta http-equiv="refresh" content="0; url=https://parlamentario.congresoedomex.gob.mx/spid/auth/login">--}}
<!DOCTYPE html>
<html class="loading" lang="en" data-textdirection="ltr">
<!-- BEGIN: Head-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta name="author" content="ThemeSelect">
<title>Ingreso</title>
<link rel="apple-touch-icon" href="{{ asset('spid/images/logo/congeso.jpg') }}">
<link rel="shortcut icon" type="image/x-icon" href="{{ asset('spid/images/logo/congeso.jpg') }}">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- BEGIN: VENDOR CSS-->
<link rel="stylesheet" type="text/css" href="{{ asset('spid/vendors/vendors.min.css') }}">
<!-- END: VENDOR CSS-->
<!-- BEGIN: Page Level CSS-->
<link rel="stylesheet" type="text/css" href="{{ asset('spid/css/themes/vertical-menu-nav-dark-template/materialize.css') }}">
<link rel="stylesheet" type="text/css" href="{{ asset('spid/css/themes/vertical-menu-nav-dark-template/style.cs') }}s">
<link rel="stylesheet" type="text/css" href="{{ asset('spid/css/pages/login.css') }}">
<!-- END: Page Level CSS-->
<!-- BEGIN: Custom CSS-->
<link rel="stylesheet" type="text/css" href="{{ asset('spid/css/custom/custom.css') }}">
<!-- END: Custom CSS-->
</head>
<style>
#loadingBack {
display:none;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color:#88898c90;
z-index: 1;
text-align: center;
padding-top: 300px;
padding-left: 22px;
}
</style>
<!-- END: Head-->
<meta name="csrf-token" content="{{ csrf_token() }}">
<body class="vertical-layout page-header-light vertical-menu-collapsible vertical-menu-nav-dark preload-transitions 1-column login-bg1 blank-page blank-page" data-open="click" data-menu="vertical-menu-nav-dark" data-col="1-column">
<div class="row">
<div class="col s12">
{{-- <div class="container">--}}
<div class="card-content" style='background-image: url("{{asset('spid/images/logo/fondo_pleno.png')}}"); background-repeat: no-repeat; background-size: cover; '>
<div id="login-page" class="row">
<div class="col s12 m6 l4 z-depth-4 card-panel border-radius-6 login-card bg-opacity-8">
<form class="login-form center-align" method="POST" action="{{ route('login') }}">
@csrf
<div class="">
<center>
<br>
<img src="{{asset('spid/images/logo/congeso.jpg')}}" alt="materialize" width="80%" heigth="80%" style="border-radius:5;"/>
</center>
</div>
<br>
<div class="row margin">
<div class="input-field col s12">
<i class="material-icons prefix pt-2">person_outline</i>
<input id="email" type="email" value="@legislativoedomex.gob.mx" class=" @error('email') is-invalid @enderror"
name="email" value="{{ old('email') }}" autocomplete="email" autofocus>
<label for="email" class="center-align">{{ __('Usuario:') }}</label>
@error('email')
<small class="red-text ml-7">
{{ $message }}
</small>
@enderror
</div>
</div>
<div class="row margin">
<div class="input-field col s12">
<i class="material-icons prefix pt-2">lock_outline</i>
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" autocomplete="current-password">
<label for="password">{{ __('Contraseña:') }}</label>
@error('password')
<small class="red-text ml-7">
{{ $message }}
</small>
@enderror
</div>
</div>
<div class="row">
<div class="input-field col s10">
<button type="submit"
class="btn waves-effect waves-light border-round col s12 bg-primary">
Ingresar
</button>
</div>
<div class="input-field col s2">
<a onclick="logHuella()"><i class="material-icons" title="Huella" style="color: #ff2e0f;">fingerprint</i></a>
</div>
</div>
<div class="row">
<div class="col s12">
<center>
<select class ="form-control browser-default" id="readersDropDown" name="readersDropDown" style="display: none;">
</select><br>
<div id="imagediv" style="width: 330px;height: 330px;overflow: hidden;border: 1px solid rgba(51, 122, 183, 0.39); display: none;"></div>
<div id="content-capture" style="display : none;"></div>
</center>
</div>
</div>
<div id="status"></div>
</form>
</div>
</div>
</div>
<div class="content-overlay"></div>
</div>
<div id="loadingBack">
<p><img src="{{asset('spid/images/logo/logo_62.png')}}" /></p>
<div class="preloader-wrapper big active">
<div class="spinner-layer spinner-red-only">
<div class="circle-clipper left">
<div class="circle"></div>
</div><div class="gap-patch">
<div class="circle"></div>
</div><div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
</div>
</div>
</div>
<script src="{{ asset('spid/js/vendors.min.js') }}"></script>
<script src="{{ asset('spid/js/plugins.js') }}"></script>
<script src="{{ asset('spid/js/search.js') }}"></script>
<script src="{{ asset('spid/js/custom/custom-script.js') }}"></script>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script src="{{'spid/js/scripts/fingerprint.sdk.min.js'}}"></script>
<script src="{{'spid/js/scripts/es6-shim.js'}}"></script>
<script src="{{'spid/js/scripts/websdk.client.bundle.min.js'}}"></script>
@if(session('usuario') == 'off')
<script>
swal({
text: "El evento no se encuentra disponible",
icon: 'error',
dangerMode: false,
buttons: {
delete: 'Aceptar'
}
});
</script>
@endif
<script type="text/javascript">
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
var test = null;
var state = document.getElementById('content-capture');
var myVal = ""; // Drop down selected value of reader
var disabled = true;
var startEnroll = false;
var currentFormat = Fingerprint.SampleFormat.PngImage;
var deviceTechn = {
0: "Unknown",
1: "Optical",
2: "Capacitive",
3: "Thermal",
4: "Pressure"
}
var deviceModality = {
0: "Unknown",
1: "Swipe",
2: "Area",
3: "AreaMultifinger"
}
var deviceUidType = {
0: "Persistent",
1: "Volatile"
}
var FingerprintSdkTest = (function () {
function FingerprintSdkTest() {
var _instance = this;
this.operationToRestart = null;
this.acquisitionStarted = false;
this.sdk = new Fingerprint.WebApi;
this.sdk.onDeviceConnected = function (e) {
// Detects if the deveice is connected for which acquisition started
// swal({
// title: "¡Atención!",
// text: "Escanear huella",
// icon: 'warning',
// dangerMode: false,
// buttons: false,
// timer:1000,
// });
console.log('Escanear huella');
};
this.sdk.onDeviceDisconnected = function (e) {
// Detects if device gets disconnected - provides deviceUid of disconnected device
// showMessage("Device disconnected");
// swal({
// title: "¡Atención!",
// text: "Lector desconectado",
// icon: 'error',
// dangerMode: false,
// buttons: false,
// timer:2000,
// });
console.log('Lector desconectaado');
};
this.sdk.onCommunicationFailed = function (e) {
// Detects if there is a failure in communicating with U.R.U web SDK
// swal({
// text: "¡Atención!",
// text: "Communinication Failed",
// icon: 'error',
// dangerMode: false,
// buttons: false,
// timer:2000,
// });
console.log('Fallo la cominicación');
};
this.sdk.onSamplesAcquired = function (s) {
// Sample acquired event triggers this function
sampleAcquired(s);
};
this.sdk.onQualityReported = function (e) {
// Quality of sample aquired - Function triggered on every sample acquired
document.getElementById("qualityInputBox").value = Fingerprint.QualityCode[(e.quality)];
}
}
FingerprintSdkTest.prototype.startCapture = function () {
if (this.acquisitionStarted) // Monitoring if already started capturing
return;
var _instance = this;
showMessage("");
this.operationToRestart = this.startCapture;
this.sdk.startAcquisition(currentFormat, myVal).then(function () {
_instance.acquisitionStarted = true;
}, function (error) {
showMessage(error.message);
});
}
FingerprintSdkTest.prototype.stopCapture = function () {
if (!this.acquisitionStarted) //Monitor if already stopped capturing
return;
var _instance = this;
showMessage("");
this.sdk.stopAcquisition().then(function () {
_instance.acquisitionStarted = false;
//Disabling stop once stoped
disableEnableStartStop();
}, function (error) {
showMessage(error.message);
});
};
// FingerprintSdkTest.prototype.getInfo = function () {
FingerprintSdkTest.prototype.getInfo = function () {
var _instance = this;
return this.sdk.enumerateDevices();
};
FingerprintSdkTest.prototype.getDeviceInfoWithID = function (uid) {
var _instance = this;
return this.sdk.getDeviceInfo(uid);
};
return FingerprintSdkTest;
})();
window.onload = function () {
localStorage.clear();
test = new FingerprintSdkTest();
var allReaders = test.getInfo();
allReaders.then(function (sucessObj) {
var readersDropDownElement = document.getElementById("readersDropDown");
readersDropDownElement.innerHTML ="";
var option = document.createElement("option");
option.selected = "selected";
option.value = sucessObj[0];
option.text = sucessObj[0];
readersDropDownElement.add(option);
});
}
function showMessage(message){
var _instance = this;
var statusWindow = document.getElementById("status");
x = state.querySelectorAll("#status");
if(x.length != 0){
x[0].innerHTML = message;
}
}
function logHuella() {
swal({
text: "¡Atención!",
text: "Escanee su huella",
icon: 'warning',
dangerMode: false,
buttons: false,
timer:1500,
});
var readersDropDownElement = document.getElementById("readersDropDown");
myVal = readersDropDownElement.options[readersDropDownElement.selectedIndex].value;
test.startCapture();
}
function sampleAcquired(s){
localStorage.setItem("imageSrc", "");
var samples = JSON.parse(s.samples);
localStorage.setItem("imageSrc", "data:image/png;base64," + Fingerprint.b64UrlTo64(samples[0]));
if(state == document.getElementById("content-capture")){
var vDiv = document.getElementById('imagediv');
vDiv.innerHTML = "";
var image = document.createElement("img");
image.id = "image";
image.className = "img-thumbnail";
image.src = localStorage.getItem("imageSrc");
vDiv.appendChild(image);
let img = localStorage.getItem("imageSrc");
$.ajax({
url: "/comprobarHuella",
type: 'POST',
data: {
'imagen' : img
},
beforeSend: function() {
showLoading()
},
success: function (response) {
hideLoading()
if (response == 0){
swal({
text: "¡Atención!",
text: "Huella no reconocida",
icon: 'warning',
dangerMode: false,
buttons: false,
timer:2000,
});
}else if (response == 1){
location.reload('sistemaVotos.index');
}
}
});
}
}
function showLoading() {
$("#loadingBack").show();
}
function hideLoading() {
$("#loadingBack").hide();
}
</script>
</body>
</html>
OHA YOOOO