Mini Shell

Direktori : /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/external/prestataires/
Upload File :
Current File : /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/external/prestataires/export_csv.php

<!doctype html>
<html lang="fr">
<head>
<?php 
require_once("_include/meta.php"); 
require_once("_include/link.php"); 
require_once("_include/script.php");
require_once("_include/init.php");
if(!current_user_can('administrator') ) {
	echo "Section réservée aux administrateurs du site uniquement. <a href='javascript:window.parent.location.href=\"/mcpv/index.php\"'>Revenir au site</a>";
	exit();
}
?>

<script type="text/javascript">

$(document).ready(function() {
	
	$('#btn-csv-prestataires').on('click',function() {
		$('#popup').modal('show');
		$.ajax({
			type: 'post',
			url: 'prestataire_csv.php',
			data: null,
			success: function(data) {
					var bom = '\ufeff' + data; // Write BOM character sequence to fix UTF-8 in Excel
					setTimeout(function() {
					  var link = document.getElementById("a-csv-download");
					  var csv = new Blob([bom], {type: 'text/csv'});
					  link.href = URL.createObjectURL(csv);
					  link.download = 'prestataires.csv';
					  $( "#btn-csv-download").click();
					  location.reload(true);
					}, 3000);

			},
			error: function(XMLHttpRequest, textStatus, errorThrown) { 
				alert("Status: " + textStatus); alert("Error: " + errorThrown); 
			}
		});
	});	
	
	$('#btn-csv-avis').on('click',function() {
		$('#popup').modal('show');
		$.ajax({
			type: 'post',
			url: 'avis_csv.php',
			data: null,
			success: function(data) {
					var bom = '\ufeff' + data; // Write BOM character sequence to fix UTF-8 in Excel
					setTimeout(function() {
					  var link = document.getElementById("a-csv-download");
					  var csv = new Blob([bom], {type: 'text/csv'});
					  link.href = URL.createObjectURL(csv);
					  link.download = 'avis.csv';
					  $( "#btn-csv-download").click();
					  location.reload(true);
					}, 3000);
					$('#popup').modal('hide');
			},
			error: function(XMLHttpRequest, textStatus, errorThrown) { 
				alert("Status: " + textStatus); alert("Error: " + errorThrown); 
			}
		});
	});	
});
</script>

<title>Export données</title>
</head>

<body>

<h5 class="text-center my-5">Exporter données vers Excel</h5>

<div class="container-flex">
	 <div class="row">
				<div class="col-4"></div>
				<div class="col-2 text-center">
					<button class="btn btn-sm btn-block btn-primary" id="btn-csv-prestataires" name="btn-csv-prestataires">
							<i class="fa fa-user"></i><br /><span>Données prestataires</span></button>
				</div>
				<div class="col-2 text-center">
					<button class="btn btn-sm btn-block btn-primary" id="btn-csv-avis" name="btn-csv-avis">
							<i class="fa fa-thermometer"></i><br /><span>Avis prestataires</span></button>
				</div>
				<div class="col-4"></div>
	</div>
</div>
<br/>

<!-- Page modale - Popup attente -->

<div class="modal fade" id="popup">
    <div class="modal-dialog modal-dialog-centered modal-sm">
        <div class="modal-content">
                <div class="modal-header text-center">Exportation données</div>
                <div id="modal-body" class="modal-body text-center">
                        Exportation en cours<br />
                        Veuillez patienter<br />
						<p class="text-center">
						  <div class="spinner-border text-primary"></div>
						</p>
                </div>
				<a href="javascript:void(0)" id="a-csv-download" style="display: none;">
					<button class="btn btn-sm btn-primary" id="btn-csv-download"><i class="fa fa-download"></i>Télécharger</button>
				</a>
        </div>
    </div>
</div>

</body>
</html>
June 16, 2021 – Page 2 – Base de données MCPV "Prestataires"

Day: June 16, 2021

High rollers tend to wager in hundred

Best Live Casino Games Evolution Games We’ve also learned about the exclusive perks of VIP clubs, the convenience of casino hotels and resorts, and the importance of safety and responsible gaming. All these elements come together to create a unique and exhilarating experience that is the world of casinos. So ジョイカジノ, when you’re ready to…

Read More

Get a profitable hand in Blackjack and double down for even

No 1 In Slots , Live Dealers And Casino Games The great point is, by law, all sweepstakes should offer gamers a no purchase required method to play, and have the prospect of winning. Pragmatic Play make awesome new slots, and have turn into an enormous sensation each on-line, and in casinos. They are in…

Read More