ldc-mesbr-app/resources/views/template/mur/imprimer.blade.php

89 lines
3.3 KiB
PHP
Raw Permalink Normal View History

2019-02-13 16:37:14 +01:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<title>Vos bons de réduction</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
2025-04-02 15:14:41 +00:00
<link rel="stylesheet" type="text/css" href="{{'/storage/landings/'.$ref}}/css/style.css">
<link rel="stylesheet" type="text/css" href="{{'/storage/landings/'.$ref}}/css/print.css" media="print">
2019-02-13 16:37:14 +01:00
<script type="text/javascript" src="https://code.jquery.com/jquery-latest.js"></script>
2025-04-02 15:14:41 +00:00
</HEAD>
2019-02-13 16:37:14 +01:00
<BODY>
<div id="nepasimprimer">
<div class="global">
2025-04-02 15:14:41 +00:00
2019-02-13 16:37:14 +01:00
<h2>Impression de vos bons de réduction</h2>
2025-04-02 15:14:41 +00:00
2019-02-13 16:37:14 +01:00
<h3><!--#4DTEXT s_Affiche_Titre--></h3>
2025-04-02 15:14:41 +00:00
2019-02-13 16:37:14 +01:00
<p class="precautions">
1 - Vérifiez que votre imprimante est allumée et reliée à l'ordinateur<br/>
2 - Vérifiez qu'elle contient du papier blanc et de l'encre<br/>
3 - Cliquez ci-dessous pour lancer l'impression
</p>
2025-04-02 15:14:41 +00:00
2019-02-13 16:37:14 +01:00
<center><input type="button" class="print" id="print_br" value="IMPRIMER MES COUPONS" onclick="impressionstart();" /></center>
2025-04-02 15:14:41 +00:00
<center><img id="loader" src="{{'/storage/landings/'.$ref}}/images/loader.gif" alt="Chargement..." /></center>
2019-02-13 16:37:14 +01:00
<input type="hidden" name="csrf" id="csrf" value="<?php echo csrf_token(); ?>">
</div>
</div>
2025-04-02 15:14:41 +00:00
2019-02-13 16:37:14 +01:00
<div id="aimprimer"></div>
2025-04-02 15:14:41 +00:00
2019-02-13 16:37:14 +01:00
<script type="text/javascript">
function impressionexe() {
var total = document.getElementsByTagName("img").length;
var compteur = 0, i;
compteur = 0;
2025-04-02 15:14:41 +00:00
2019-02-13 16:37:14 +01:00
for(i=0; i<total; i++){
if(document.getElementsByTagName("img")[i].complete){
2025-04-02 15:14:41 +00:00
compteur++;
2019-02-13 16:37:14 +01:00
}
}
2025-04-02 15:14:41 +00:00
2019-02-13 16:37:14 +01:00
if(compteur < total){
setTimeout("impressionexe()",2500);
}
2025-04-02 15:14:41 +00:00
else {
2019-02-13 16:37:14 +01:00
window.print();
2021-06-30 11:11:05 +02:00
document.location.href="/merci";
2019-02-13 16:37:14 +01:00
}
}
2025-04-02 15:14:41 +00:00
2019-02-13 16:37:14 +01:00
function impressioncharge() {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('#csrf').val()
}
});
$.ajax({
type:"POST",
url:"/ajx_impression",
data:"",
2025-04-02 15:14:41 +00:00
2019-02-13 16:37:14 +01:00
success:function(reponse){
if(reponse != ""){
2025-04-02 15:14:41 +00:00
var codehtmlimpression = reponse;
2019-02-13 16:37:14 +01:00
document.getElementById("aimprimer").innerHTML = codehtmlimpression;
setTimeout("impressionexe()",2500);
}
2025-04-02 15:14:41 +00:00
else {
2019-02-13 16:37:14 +01:00
alert("pas de réponse du serveur");
}
}
});
}
2025-04-02 15:14:41 +00:00
2019-02-13 16:37:14 +01:00
function impressionstart() {
document.getElementById('print_br').style.display='none';
document.getElementById('loader').style.display='block';
impressioncharge();
2025-04-02 15:14:41 +00:00
}
2019-02-13 16:37:14 +01:00
</script>
</BODY>
2025-04-02 15:14:41 +00:00
</HTML>