245 lines
7.4 KiB
PHP
245 lines
7.4 KiB
PHP
|
<?php include('techsyn_header.php'); ?>
|
||
|
<!-- Main Content Container for side bar and body-->
|
||
|
<div class="main-container ace-save-state" id="main-container">
|
||
|
<script type="text/javascript">
|
||
|
try {
|
||
|
ace.settings.loadState('main-container')
|
||
|
} catch (e) {}
|
||
|
</script>
|
||
|
<?php include('techsyn_sidebar.php'); ?>
|
||
|
|
||
|
<!--breadcrumb-->
|
||
|
<?php
|
||
|
$current_month = date('m');
|
||
|
$current_year = date('Y');
|
||
|
$current_day = date('d');
|
||
|
?>
|
||
|
|
||
|
<div class="main-content">
|
||
|
<div class="main-content-inner">
|
||
|
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
|
||
|
<ul class="breadcrumb">
|
||
|
<li class="active">Reports</li>
|
||
|
<li class="active">Bulk Upload Report</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
|
||
|
|
||
|
<!-- End of breadcrumb -->
|
||
|
|
||
|
</div>
|
||
|
<div class="page-content">
|
||
|
<div id="flexigridDiv" class="table-responsiv">
|
||
|
<h4 style="font-size: 15px; text-align: center; font-weight: bold">Bulk Upload Reports</h4>
|
||
|
|
||
|
|
||
|
|
||
|
<table class="table table-bordered" style="width: 100%">
|
||
|
|
||
|
<tr>
|
||
|
<td width="50%" align="left"><b>
|
||
|
<h4>Report name</h4>
|
||
|
</b></td>
|
||
|
<td align="left"><select class="chosen-select" id="report_type" name="report_type" onchange="show_link(this.value)">
|
||
|
|
||
|
<option value="" disabled selected>please select a report</option>
|
||
|
<option value="vaccine_report">vaccination Upload</option>
|
||
|
|
||
|
</select></td>
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
</table>
|
||
|
|
||
|
|
||
|
<form id="vaccine_link_form" name="vaccine_link_form">
|
||
|
<table id="vaccine_link" class="table table-bordered" style="width: 100%; display: none;">
|
||
|
|
||
|
<thead>
|
||
|
<tr>
|
||
|
|
||
|
<td style="font-size: 10px" width="15%"><strong>Download Report</strong></td>
|
||
|
<td style="font-size: 10px" width="15%"><strong>Upload Report</strong></td>
|
||
|
|
||
|
|
||
|
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
|
||
|
<tr>
|
||
|
|
||
|
<td><a href="#" onclick="downlaod_temp();">
|
||
|
<span class="print_excel" style="padding-left: 20px;">vaccination Upload
|
||
|
Template</span></a>
|
||
|
</td>
|
||
|
<td><a href="#" onclick="show_link('upload_vaccine');">
|
||
|
<span class="print_excel" style="padding-left: 20px;">Upload vaccination
|
||
|
Excel</span>
|
||
|
</td>
|
||
|
|
||
|
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
|
||
|
</table>
|
||
|
</form>
|
||
|
<div class="container">
|
||
|
<form action="" method="post" name="upload_vaccine_form" id="upload_vaccine_form" enctype="multipart/form-data">
|
||
|
<div class="panel panel-info" id="upload_vaccine" style="margin-top:50px;width: 100%; display: none;">
|
||
|
|
||
|
<div class="panel-heading"><b>Upload Excel For Vaccination</b></div>
|
||
|
<div class="panel-body" style="height:300px">
|
||
|
|
||
|
<div class="form-group">
|
||
|
<div class="col-xs-3">
|
||
|
</div>
|
||
|
<div class="col-xs-6">
|
||
|
<input type="file" id="id-input-file-2" name="file" accept=".xls,.xlsx" />
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
<div class="panel-footer"> <button type="submit" name="import" value="1" id="submit" class="btn btn-xs btn-primary">
|
||
|
Upload</button></div>
|
||
|
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<?php include('techsyn_footer.php'); ?>
|
||
|
<style>
|
||
|
.outer-container {
|
||
|
background: #F0F0F0;
|
||
|
border: #e0dfdf 1px solid;
|
||
|
padding: 40px 20px;
|
||
|
border-radius: 2px;
|
||
|
}
|
||
|
|
||
|
.btn-submit {
|
||
|
background: #333;
|
||
|
border: #1d1d1d 1px solid;
|
||
|
border-radius: 2px;
|
||
|
color: #f0f0f0;
|
||
|
cursor: pointer;
|
||
|
padding: 5px 20px;
|
||
|
font-size: 0.9em;
|
||
|
}
|
||
|
|
||
|
.tutorial-table {
|
||
|
margin-top: 40px;
|
||
|
font-size: 0.8em;
|
||
|
border-collapse: collapse;
|
||
|
width: 100%;
|
||
|
}
|
||
|
|
||
|
.tutorial-table th {
|
||
|
background: #f0f0f0;
|
||
|
border-bottom: 1px solid #dddddd;
|
||
|
padding: 8px;
|
||
|
text-align: left;
|
||
|
}
|
||
|
|
||
|
.tutorial-table td {
|
||
|
background: #FFF;
|
||
|
border-bottom: 1px solid #dddddd;
|
||
|
padding: 8px;
|
||
|
text-align: left;
|
||
|
}
|
||
|
|
||
|
#response {
|
||
|
padding: 10px;
|
||
|
margin-top: 10px;
|
||
|
border-radius: 2px;
|
||
|
display: none;
|
||
|
}
|
||
|
|
||
|
.success {
|
||
|
background: #c7efd9;
|
||
|
border: #bbe2cd 1px solid;
|
||
|
}
|
||
|
|
||
|
.error {
|
||
|
background: #fbcfcf;
|
||
|
border: #f3c6c7 1px solid;
|
||
|
}
|
||
|
|
||
|
div#response.display-block {
|
||
|
display: block;
|
||
|
}
|
||
|
|
||
|
.input-group-addon {
|
||
|
height: 25px;
|
||
|
width: 30px;
|
||
|
padding: 0px 0px;
|
||
|
}
|
||
|
</style>
|
||
|
<script>
|
||
|
function downlaod_temp() {
|
||
|
document.forms['vaccine_link_form'].target = '_blank';
|
||
|
document.forms['vaccine_link_form'].action = "vaccine_templet_excel.php";
|
||
|
document.forms['vaccine_link_form'].method = 'POST';
|
||
|
document.forms['vaccine_link_form'].submit();
|
||
|
}
|
||
|
|
||
|
function upload_temp() {
|
||
|
document.forms['vaccine_link_form'].target = '_blank';
|
||
|
document.forms['vaccine_link_form'].action = "upload_vaccination_detail_script.php";
|
||
|
document.forms['vaccine_link_form'].method = 'POST';
|
||
|
document.forms['vaccine_link_form'].submit();
|
||
|
}
|
||
|
|
||
|
function show_link(repID) {
|
||
|
|
||
|
if (repID === 'vaccine_report') {
|
||
|
$("#vaccine_link").show();
|
||
|
} else
|
||
|
$("#vaccine_link").hide();
|
||
|
|
||
|
if (repID === 'upload_vaccine') {
|
||
|
$("#upload_vaccine").show();
|
||
|
} else
|
||
|
$("#upload_vaccine").hide();
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
$('#upload_vaccine_form').on('submit', function(event) {
|
||
|
event.preventDefault();
|
||
|
$.ajax({
|
||
|
url: "upload_vaccination_detail_interm_script.php",
|
||
|
method: "POST",
|
||
|
data: new FormData(this),
|
||
|
contentType: false,
|
||
|
processData: false,
|
||
|
dataType: 'json',
|
||
|
success: function(data) {
|
||
|
window.location = "show_temp_vaccine_upload_data.php?vaccine_interm_id=" + data;
|
||
|
// BootstrapDialog.alert(' Data Uploaded Successfully' + data);
|
||
|
},
|
||
|
error: function(data) {
|
||
|
BootstrapDialog.alert('Failed To Upload Data');
|
||
|
}
|
||
|
});
|
||
|
})
|
||
|
</script>
|