File: /home/cafsindia/refimac_cafsjobs_com/op_amc_proposal_bk05july2017.php
<div id="contentwrapper">
<div class="main_content">
<div class="page-head">
<div class="container">
<!-- BEGIN PAGE TITLE -->
<div class="page-title">
<h1>AMC Proposal<small>Manage your amc proposal.</small></h1>
</div>
</div>
</div>
<div class="page-content">
<div class="container">
<div class="row-fluid">
<div class="span12">
<?php
if($nav=="1"||$nav=="3")
echo "<div class='alert alert-success'>
<span>Given information successfully updated !</span>
</div>";
elseif($nav=="2"||$nav=="4"||$nav=="6")
echo "<div class='alert alert-warning'>
<span>sorry, given information not updated, please try again !</span>
</div>";
elseif($nav=="5")
echo "<div class='alert alert-danger'>
<span>Selected Record successfully deleted !</span>
</div>";
?>
</div>
</div>
<div class="page-content-inner">
<form name="form1" action="print_all.php?number=1" target="_blank" method="post">
<div class="portlet light">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label> Month&Year :</label>
<input name="fromdate" type="text" class="form-control col-md-4 date-picker" data-date-format="yyyy-mm" id="fromdate" />
</div>
<div class="col-md-3">
<label>Surround Area <span class="f_req">*</span></label>
<select name="surround_area" class="form-control select2 uppercase" id="surround_area" style="max-height:400px;" >
<option value="">Select</option>
<option value="All">All</option>
<?php
$sql="select area_name from area where area_update=1";
$qu=mysql_query($sql);
while($r=mysql_fetch_array($qu))
{
?>
<option <?php if($per1==$r['area_name']) echo "selected='selected'";?> value="<?php echo $r['area_name'];?>"><?php echo $r['area_name'];?></option>
<?php }?>
</select>
</div>
<div class="col-md-3">
<label>Filter<span class="f_req">*</span></label>
<select name="filter" class="form-control select2 uppercase" id="filter" style="max-height:400px;" >
<option value="">Select</option>
<option value="Machine Wise">Machine Wise</option>
<option value="Group Service">Group Service</option>
</select>
</div>
<div class="col-md-3">
<label> </label>
</br>
<input type="button" id="btnsearchservice" class="btn green" value="Search" >
</div>
</br>
</br>
<div class="row">
<div class="col-md-12">
<input type="image" src="assets/global/plugins/jquery-file-upload/img/loading.gif" id="searchloadingnew" style="display:none;"/>
</br>
</br>
</br>
</br>
<div id="serviceresult" style="display:none">
</div>
</div>
<span id="searchresult">
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
<div id="resultdiv">
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function()
{
if ( $.fn.dataTable.isDataTable( '#sample' ) ) {
table = $('#sample').DataTable();
}
else {
table = $('#sample').DataTable( {
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print','pageLength'
], lengthMenu: [
[ 10, 25, 50, -1 ],
[ '10 rows', '25 rows', '50 rows', 'Show all' ]
]
} );
}
$('.cancel').click(function()
{
location.reload();
});
});
$( "#btnsearchservice" ).click(function(e) {
event.preventDefault();
//show loading
$('#searchloadingnew').show();
// hide loading
$('#serviceresult').hide();
fromdate =$('#fromdate').val();
filter=$('#filter').val();
surround_area=$('#surround_area').val();
//searchby = $('#searchby').val();
//searchtext = $('#searchtext').val();
$.ajax({
type: "POST",
url: "ajax/loaddata.php",
data: {type:"1",pageid:"2_3_1",month:fromdate,filter:filter,surround_area:surround_area},
success: function(msg) {
$('#serviceresult').html(msg);
$('#searchloadingnew').hide();
$('#serviceresult').show();
table = $('#viewservicedetails').DataTable( {
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print','pageLength'
], lengthMenu: [
[ 10, 25, 50, -1 ],
[ '10 rows', '25 rows', '50 rows', 'Show all' ]
]
} );
//
}
});
assignhiddenval();
});
// Wait for the DOM to be ready
$(function() {
// Initialize form validation on the registration form.
// It has the name attribute "registration"
$("form[name='form1']").validate({
// Specify validation rules
rules: {
// The key name on the left side is the name attribute
// of an input field. Validation rules are defined
// on the right side
EMP_NAME: "required",
EMP_MOBILE: "required",
EMP_DOJ: {
required: true,
// Specify that email should be validated
// by the built-in "email" rule
//email: true
}
},
// Specify validation error messages
messages: {
EMP_NAME: "Please enter employee name",
EMP_MOBILE: "Please enter employee mobile",
page_name: "Please select doj"
},
// Make sure the form is submitted to the destination defined
// in the "action" attribute of the form when valid
submitHandler: function(form) {
form.submit();
}
});
});
</script>