132 lines
4.3 KiB
PHP
132 lines
4.3 KiB
PHP
<?php @ob_start(); session_start();?>
|
|
<!DOCTYPE html>
|
|
<html lang="pl">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="shortcut icon" href="../images/SoftSPM.ico">
|
|
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
|
<title>Zabudowa studni</title>
|
|
|
|
<!-- Bootstrap -->
|
|
<link href="./bootstrap.min.css" rel="stylesheet">
|
|
<link href="./datepicker-time/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
|
|
|
|
<script src="./jquery.min.js"></script>
|
|
|
|
<script type="text/javascript" src="./datepicker-time/js/bootstrap-datetimepicker.js" charset="UTF-8"></script>
|
|
<script type="text/javascript" src="./datepicker-time/js/locales/bootstrap-datetimepicker.pl.js" charset="UTF-8"></script>
|
|
|
|
|
|
<style type="text/css">
|
|
#loader {
|
|
border: 16px solid #f3f3f3; /* Light grey */
|
|
border-top: 16px solid #3498db; /* Blue */
|
|
border-radius: 50%;
|
|
width: 120px;
|
|
height: 120px;
|
|
animation: spin 2s linear infinite;
|
|
|
|
position:absolute;
|
|
left:50%; /* wyśrodkowujemy w poziomie */
|
|
top:50%; /* wyśrodkowujemy w pionie */
|
|
background-position:center;
|
|
margin:-64px 0 0 -64px; /* no bo chcemy idealnie wycentrować, nie? */
|
|
}
|
|
|
|
@keyframes spin {
|
|
0% { transform: rotate(0deg); }
|
|
100% { transform: rotate(360deg); }
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
<body>
|
|
<div id="loader"></div>
|
|
|
|
<?php
|
|
date_default_timezone_set('Europe/Warsaw');
|
|
|
|
$fileName=base64_encode($_SESSION['user']."_".date("YmdHis")."_rep014");
|
|
//base64_encode($_GET['dev']);
|
|
//base64_decode($_GET['dev']);
|
|
|
|
?>
|
|
|
|
<div class="panel panel-danger">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title">Zabudowa studni <?php echo $_SESSION['syndis_eq_stock'];?></h3>
|
|
</div>
|
|
<div class="panel-body">
|
|
<div class="form-group col-md-2">
|
|
<label class="sr-only" for="exampleInputAmount"></label>
|
|
<div class="input-group">
|
|
<div class="input-group-addon">Na dzień:</div>
|
|
<input class="form-control form_datetime" id="rep014_date" type="text" name="rep014_date" value="<?php echo date('Y-m-d H:i:').'00'; ?>">
|
|
</div>
|
|
</div>
|
|
<button id="butShow" type="button" class="btn btn-info" value="Generuj">Generuj</button>
|
|
|
|
|
|
|
|
</div>
|
|
<div class="panel-footer">
|
|
<a id="but1" class="btn btn-default" href="#" role="button" onclick="window.print();">Drukuj <span class="glyphicon glyphicon-print" aria-hidden="true"></span></a>
|
|
<a id="but2" class="btn btn-success" href="./rep_014_xls.php?fm=<?php echo $fileName; ?>" target="_blank" role="button">Eksport do Excel <span class="glyphicon glyphicon-file" aria-hidden="true"></span></a>
|
|
<a id="but3" class="btn btn-danger" href="./rep_014_pdf.php?fm=<?php echo $fileName; ?>" target="_blank" role="button">Eksport do PDF <span class="glyphicon glyphicon-file" aria-hidden="true"></span></a>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script src="./bootstrap.min.js"></script>
|
|
<script>
|
|
$(window).load(function() {
|
|
$('#loader').hide();
|
|
$('#but1').prop('disabled', true);
|
|
$('#but2').prop('disabled', true);
|
|
$('#but3').prop('disabled', true);
|
|
|
|
$('#butShow').click(function() {
|
|
$('#butShow').prop('disabled', true);
|
|
$('#but1').prop('disabled', true);
|
|
$('#but2').prop('disabled', true);
|
|
$('#but3').prop('disabled', true);
|
|
$('#loader').show();
|
|
|
|
$.post( "./ajax_gen_reports.php", { post_action: "rep014", done: "create", dep: "<?php echo $_SESSION['syndis_eq_stock'];?>", post_date: $('#rep014_date').val(), file: "<?php echo $fileName; ?>"}).done(function(data)
|
|
{
|
|
$('#main_table').html(data);
|
|
|
|
$('#butShow').prop('disabled', false);
|
|
$('#loader').hide();
|
|
$('#but1').prop('disabled', false);
|
|
$('#but2').prop('disabled', false);
|
|
$('#but3').prop('disabled', false);
|
|
});
|
|
});
|
|
|
|
$('.form_datetime').datetimepicker({
|
|
weekStart: 1,
|
|
todayBtn: 1,
|
|
autoclose: 1,
|
|
todayHighlight: 1,
|
|
startView: 2,
|
|
forceParse: 0,
|
|
showMeridian: 1,
|
|
format: 'yyyy-mm-dd HH:ii:ss',
|
|
});
|
|
|
|
|
|
});
|
|
</script>
|
|
|
|
|
|
<div id="main_table">
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|
|
<?php ob_end_flush();?>
|