155 lines
4.2 KiB
PHP
155 lines
4.2 KiB
PHP
<?php include('techsyn_header.php');
|
|
error_reporting(E_ERROR | E_WARNING | E_PARSE);
|
|
?>
|
|
<!-- Main Content Container for sid 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">Procurment List</li>
|
|
<li class="active">Upload Excel</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<!-- End of breadcrumb -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="container">
|
|
<form action="" method="post" name="frmExcelImport" id="frmExcelImport" enctype="multipart/form-data">
|
|
<div class="panel panel-info" style="margin-top:50px">
|
|
|
|
<div class="panel-heading"><b>Upload Excel For Procurment List</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>
|
|
|
|
|
|
<?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>
|
|
$('#frmExcelImport').on('submit', function(event) {
|
|
event.preventDefault();
|
|
$.ajax({
|
|
url: "upload_excel_procurement_script_interm.php",
|
|
method: "POST",
|
|
data: new FormData(this),
|
|
contentType: false,
|
|
processData: false,
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
console.log('====================================');
|
|
console.log(data);
|
|
console.log('====================================');
|
|
|
|
location.href = 'upload_excel_procurment_inermed.php?inter_procurement_id=' +
|
|
data;
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Data uploading failed');
|
|
}
|
|
});
|
|
})
|
|
</script>
|