This commit is contained in:
KANE LAZENI 2026-01-04 10:51:15 +00:00
parent 632539c637
commit cb762ef1c9
2 changed files with 531 additions and 1 deletions

View File

@ -1785,3 +1785,533 @@ function fiche_beneficiaire()
window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"+idBeneficiaire);
}
function ebene_init_confirm_photo_face() // OK
{
faceRegistered = $("#faceRegistered").val();
if(faceRegistered!="1")
{
v_msg="Cettte personne n'a pas encore de face dans le système!";
v_msgEng="This person doesn't have a face in the system yet!";
alert_ebene(v_msg, v_msgEng);
$('#message_face').html("");
return;
}
re_init_photo_face();
$("#btn_pop_save_face").click();
}
function ebene_confirmer_photo_face() // OK
{
$("#ebene_confirmer_photo_face").disable();
$("#ebene_supprimer_photo_face").disable();
$("#ebene_take_photo_face").disable();
$("#motif").disable();
$("ebene_confirmer_photo_face").prop('disabled', true);
$("ebene_supprimer_photo_face").prop('disabled', true);
$("ebene_take_photo_face").prop('disabled', true);
$("motif").prop('disabled', true);
$('#message_face').html("");
$("#div_wait_face_ebene").html('');
$("#del_face").val("0");
faceRegistered = $("#faceRegistered").val();
if(faceRegistered!="1")
{
v_msg="Cette personne n'a pas encore de photo dans le système!";
v_msgEng="This person does not have a photo in the system yet!";
alert_ebene(v_msg, v_msgEng);
$('#message_face').html("");
return;
}
image_face = $("#image_face").val();
if(image_face<=" ")
{
v_msg="Veuillez prendre une photo!";
v_msgEng="Please take a photo!";
alert_ebene(v_msg, v_msgEng);
$('#message_face').html("");
return;
}
$("#div_wait_face_ebene").html('<div><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
compare_face = $("#compare_face").val();
var dataURL = canvas.toDataURL("image/jpeg");
$.ajax({
url: $("#racineWeb").val()+"Prestations/ebeneenregistrerface/",
type: 'POST',
data: {'image_face' : dataURL, 'compare_face' : compare_face , 'del_face' : "0"},
success: function(data) {
$("#ebene_take_photo_face").enable();
$("#div_wait_face_ebene").html('');
$("#message_face").html(data);
photo_succes = $("#photo_succes").val();
if(photo_succes=="1")
{
$("#okId_face").val("1");
v_msg="Face confirmée!";
v_msgEng="Face confirmed!";
// alert_ebene(v_msg, v_msgEng);
setTimeout(() => {
prestations();
}, 2000)
}
else
{
$("#okId").val("-1");
$("#okId_face").val("-1");
}
},
error: function(data) {
},
complete: function(data) {
$("#div_wait_face_ebene").html('');
}
});
}
function ebene_supprimer_photo_face() // OK
{
$('#message_face').html("");
$("#div_wait_face_ebene").html('');
motif=$("#motif").val();
motif= motif.trim();
$("#motif").val(motif);
if (motif<=" ")
{
v_msg="Veuillez saisir un motif!";
v_msgEng="Please enter a reaon!";
alert_ebene(v_msg, v_msgEng);
$("#motif").focus();
return;
}
$("#del_face").val("1");
faceRegistered = $("#faceRegistered").val();
if(faceRegistered!="1")
{
v_msg="Cette personne n'a pas encore de photo dans le système!";
v_msgEng="This person does not have a photo in the system yet!";
alert_ebene(v_msg, v_msgEng);
return;
}
image_face = $("#image_face").val();
if(image_face<=" ")
{
v_msg="Veuillez prendre une photo!";
v_msgEng="Please take a photo!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous cette suppression?";
v_msgEng="Do you confirm this deletion?";
if(confirm_ebene(v_msg, v_msgEng))
{
$("#ebene_confirmer_photo_face").disable();
$("#ebene_supprimer_photo_face").disable();
$("#ebene_take_photo_face").disable();
$("#motif").disable();
$("ebene_confirmer_photo_face").prop('disabled', true);
$("ebene_supprimer_photo_face").prop('disabled', true);
$("ebene_take_photo_face").prop('disabled', true);
$("motif").prop('disabled', true);
$("#div_wait_face_ebene").html('<div><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
compare_face = $("#compare_face").val();
var dataURL = canvas.toDataURL("image/jpeg");
$.ajax({
url: $("#racineWeb").val()+"Prestations/ebeneenregistrerface/",
type: 'POST',
data: {'image_face' : dataURL, 'compare_face' : compare_face, 'del_face' : "1", 'motif' : motif},
success: function(data) {
$("#ebene_take_photo_face").enable();
$("#div_wait_face_ebene").html('');
$("#message_face").html(data);
photo_succes = $("#photo_succes").val();
if(photo_succes=="1")
{
$("#okId").val("-1");
$("#okId_face").val("-1");
document.getElementById('photo_face').setAttribute('src', "");
$("#faceRegistered").val("0");
$("#ebene_confirmer_photo_face").disable();
$("#ebene_supprimer_photo_face").disable();
$("#motif").disable();
$("ebene_confirmer_photo_face").prop('disabled', true);
$("ebene_supprimer_photo_face").prop('disabled', true);
$("motif").prop('disabled', true);
v_msg="Face supprimée avec succès!";
v_msgEng="Face removed successfully!";
// alert_ebene(v_msg, v_msgEng);
setTimeout(() => {
prestations();
}, 2000)
}
},
error: function(data) {
},
complete: function(data) {
$("#div_wait_face_ebene").html('');
}
});
}
}
function histsupprface()
{
$("#div_detail_suppr_face").html("");
debut=$("#debut").val();
fin=$("#fin").val();
donnees = 'debut='+debut+'&fin='+fin;
$("#div_detail_suppr_face").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxhistsupprface/",
type : 'post',
data: donnees,
error: function(errorData) {
},
success: function(data) {
$("#div_detail_suppr_face").html(data);
},
complete: function() {
}
});
}
function histsupprface_export()
{
$("#div_detail_suppr_face").html("");
debut=$("#debut").val();
fin=$("#fin").val();
donnees = 'debut='+debut+'&fin='+fin;
donnees_retour = "";
$("#div_detail_suppr_face").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxhistsupprfaceexport/",
type : 'post',
data: donnees,
error: function(errorData) {
},
success: function(data) {
donnees_retour = data;
},
complete: function() {
$("#div_detail_suppr_face").html(donnees_retour);
}
});
}
function histo_enrollement_face()
{
$("#div_detail_suppr_face").html("");
debut=$("#debut").val();
fin=$("#fin").val();
donnees = 'debut='+debut+'&fin='+fin;
donnees_retour = "";
$("#div_detail_suppr_face").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxhistsupprfaceexport/historiqueenrollement/",
type : 'post',
data: donnees,
error: function(errorData) {
},
success: function(data) {
donnees_retour = data;
},
complete: function() {
$("#div_detail_suppr_face").html(donnees_retour);
}
});
}
function afficher_liste_log_reconnaissance_faciale()
{
debut = $("#debut").val();
fin = $("#fin").val();
donnees = 'debut='+debut+'&fin='+fin;
$("#div_detail").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlogreconnaissancefaciale/",
type : 'post',
data: donnees,
error: function(errorData) {
},
success: function(data) {
// $("#div_test_gabarit").html(data);
$("#div_detail").html(data);
},
complete: function() {
}
});
}
function exporter_log_reconnaissance_faciale()
{
debut = $("#debut").val();
fin = $("#fin").val();
donnees = 'debut='+debut+'&fin='+fin;
$("#div_deatil_pop").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$("#btn_pop").click();
$.ajax({
url: $("#racineWeb").val()+"Ajaxlogreconnaissancefaciale/exporterlogreconnaissancefaciale/",
type : 'post',
data: donnees,
error: function(errorData) {
},
success: function(data) {
// $("#div_test_gabarit").html(data);
$("#div_deatil_pop").html(data);
},
complete: function() {
}
});
}
function afficher_liste_log_register_face()
{
debut = $("#debut").val();
fin = $("#fin").val();
donnees = 'debut='+debut+'&fin='+fin;
$("#div_detail").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlogregisterface/",
type : 'post',
data: donnees,
error: function(errorData) {
},
success: function(data) {
// $("#div_test_gabarit").html(data);
$("#div_detail").html(data);
},
complete: function() {
}
});
}
function exporter_log_register_face()
{
debut = $("#debut").val();
fin = $("#fin").val();
donnees = 'debut='+debut+'&fin='+fin;
$("#div_deatil_pop").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$("#btn_pop").click();
$.ajax({
url: $("#racineWeb").val()+"Ajaxlogregisterface/getlogreregisterfaceexport/",
type : 'post',
data: donnees,
error: function(errorData) {
},
success: function(data) {
// $("#div_test_gabarit").html(data);
$("#div_deatil_pop").html(data);
},
complete: function() {
}
});
}
function afficher_liste_log_remove_face()
{
debut = $("#debut").val();
fin = $("#fin").val();
donnees = 'debut='+debut+'&fin='+fin;
$("#div_detail").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlogremoveface/",
type : 'post',
data: donnees,
error: function(errorData) {
},
success: function(data) {
// $("#div_test_gabarit").html(data);
$("#div_detail").html(data);
},
complete: function() {
}
});
}
function exporter_log_remove_face()
{
debut = $("#debut").val();
fin = $("#fin").val();
donnees = 'debut='+debut+'&fin='+fin;
$("#div_deatil_pop").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$("#btn_pop").click();
$.ajax({
url: $("#racineWeb").val()+"Ajaxlogremoveface/getlogreremovefaceexport/",
type : 'post',
data: donnees,
error: function(errorData) {
},
success: function(data) {
// $("#div_test_gabarit").html(data);
$("#div_deatil_pop").html(data);
},
complete: function() {
}
});
}
function ctrlkeypress_liste_logconnexion(ev)
{
var keycode = (ev.keyCode ? ev.keyCode : ev.which);
if(keycode == '13')
{
afficher_liste_logconnexion();
}
}
function afficher_liste_logconnexion()
{
login = $("#login").val();
ipConnexion = $("#ipConnexion").val();
debut = $("#debut").val();
fin = $("#fin").val();
donnees = 'login='+login+'&ipConnexion='+ipConnexion+'&debut='+debut+'&fin='+fin;
$("#div_detail").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlogconnexion/",
type : 'post',
data: donnees,
error: function(errorData) {
},
success: function(data) {
// $("#div_test_gabarit").html(data);
$("#div_detail").html(data);
},
complete: function() {
}
});
}
function exporter_liste_logconnexion()
{
login = $("#login").val();
ipConnexion = $("#ipConnexion").val();
debut = $("#debut").val();
fin = $("#fin").val();
donnees = 'login='+login+'&ipConnexion='+ipConnexion+'&debut='+debut+'&fin='+fin;
$("#div_deatil_pop").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$("#btn_pop").click();
$.ajax({
url: $("#racineWeb").val()+"Ajaxlogconnexion/exporterlogconnexion/",
type : 'post',
data: donnees,
error: function(errorData) {
},
success: function(data) {
$("#div_deatil_pop").html(data);
},
complete: function() {
}
});
}
// Récupère les coordonnées géographiques à partir de l'adresse IP entrée en paramètre
// et l'affiche sur une carte google Map
function trouve_coordonnees_geo_ip(ip)
{
donnees='ipConnexion='+ip;
$.ajax({
url: "Ajaxlogconnexion/getcoordonneesgeoip/",
type : 'post',
data: donnees,
error: function(errorData){
},
success: function(data) {
if(data !='false')
{
var str = data.split('/'),
lat = str[0], // Latitude de l'adresse IP retourné
lon = str[1], // Longitude de l'adresse IP retourné
out = "&output=embed"
src="https://maps.google.com/maps?q="+lat+","+lon+out; // Source de l'iframe
$('#map').attr("src", src);
$('#div_contenu_map').modal("show"); // Affiche en modal = carte google
$('#div_contenu_map').on('hidden.bs.modal', function(){
$('#map').html("").attr("src", ""); // Réinitialise la source de l'iframe à la fermeture du modal
});
}
else
{
v_msg="Impossible de trouver les coordonnées géographiques de l'adresse IP: "+ip;
v_msgEng="Unable to find the geographic coordinates of the IP address: "+ip;
alert_ebene(v_msg, v_msgEng);
}
},
complete: function() {
}
});
}

View File

@ -637,7 +637,7 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte'];
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<!-- Application Scripts -->
<script src="/Js/fonctions.js?ver=2026.01.04.25"></script>
<script src="/Js/fonctions.js?ver=2026.01.04.26"></script>
<script type="text/javascript">
raffraichier_gabarit();