180 lines
4.2 KiB
PHP
180 lines
4.2 KiB
PHP
|
<?php include('techsyn_header.php');
|
||
|
error_reporting(E_ERROR | E_WARNING | E_PARSE);
|
||
|
?>
|
||
|
<!-- Main Content Container for sid 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
|
||
|
|
||
|
?>
|
||
|
|
||
|
<div class="main-content">
|
||
|
<div class="main-content-inner">
|
||
|
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
|
||
|
<ul class="breadcrumb">
|
||
|
<li class="active">Medical List</li>
|
||
|
<li class="active">Upload Excel</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
|
||
|
|
||
|
<!-- End of breadcrumb -->
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
<div class="container">
|
||
|
<form action="" method="post" name="frmExcelImports" id="frmExcelImports" enctype="multipart/form-data">
|
||
|
<div class="panel panel-info" style="margin-top:50px">
|
||
|
<div class="panel-heading"><b>Upload Excel For Medical List</b></div>
|
||
|
<div class="panel-body" style="height:300px">
|
||
|
<div class="form-group">
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="col-sm-6 form-group">
|
||
|
<label for="ailment" class="inline">CHECK UP TYPE</label>
|
||
|
<select class="form-control select2" name="checkup_type_id" id="checkup_type_id" value="checkup_type_id">
|
||
|
<option value="">--Select Checkup Type--</option>
|
||
|
<?
|
||
|
$sqli = "select * from checkup_type where type_status='Active'";
|
||
|
error_log("sql" . $sqli);
|
||
|
$resulti = mysqli_query($conn, $sqli);
|
||
|
while ($rowi = mysqli_fetch_array($resulti)) {
|
||
|
?>
|
||
|
<option value="<? echo $rowi['checkup_type_id']; ?>"><? echo $rowi['checkup_type_name']; ?></option>
|
||
|
<?
|
||
|
}
|
||
|
?>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="row">
|
||
|
<div class="col-sm-12 form-group">
|
||
|
<label for="ailment">Select the excel File(.xls)</label>
|
||
|
|
||
|
<input type="file" id="id-input-file-2" name="file" accept=".xls,.xlsx" style="width: auto;" />
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="panel-footer"> <button type="button" class="btn btn-info btn-sm save_button" onclick="validate();"> Upload</button></div>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<?php include('techsyn_footer.php'); ?>
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
body {
|
||
|
font-family: Arial;
|
||
|
width: 100%;
|
||
|
}
|
||
|
|
||
|
.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;
|
||
|
}
|
||
|
</style>
|
||
|
<script>
|
||
|
function validate() {
|
||
|
var checkup_type_id = $('#checkup_type_id').val();
|
||
|
if (checkup_type_id == '') {
|
||
|
BootstrapDialog.alert('Please Enter checkup type.!!!');
|
||
|
return false;
|
||
|
}
|
||
|
var file_id = $('#id-input-file-2').val();
|
||
|
if (file_id == '') {
|
||
|
BootstrapDialog.alert('Please select the file.!!!');
|
||
|
return false;
|
||
|
}
|
||
|
$("#frmExcelImports").submit();
|
||
|
|
||
|
}
|
||
|
|
||
|
$('#frmExcelImports').on('submit', function(event) {
|
||
|
event.preventDefault();
|
||
|
$.ajax({
|
||
|
url: "upload_checkup_exam_excel.php",
|
||
|
method: "POST",
|
||
|
data: new FormData(this),
|
||
|
contentType: false,
|
||
|
processData: false,
|
||
|
dataType: 'json',
|
||
|
success: function(data) {
|
||
|
BootstrapDialog.alert(' Data Uploaded Successfully' + data.responseText);
|
||
|
},
|
||
|
error: function(data) {
|
||
|
BootstrapDialog.alert('Failed To Upload Data' + data.responseText);
|
||
|
}
|
||
|
});
|
||
|
})
|
||
|
</script>
|