MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: /home/cafsindia/refimac_cafsjobs_com/op_amc_proposal.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> &nbsp;</label>
                     </br>
                     <span id="btnsearchservicebtn">
                       <input type="button"  id="btnsearchservice" class="btn green" value="Search" ></span>
                   </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>
<div class="modal fade" id="updateamcmodel" role="dialog" aria-hidden="true">
 <div class="modal-dialog modal-full">
   <div class="modal-content">
     <div class="modal-header">
       <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
       <h4 class="modal-title">AMC Modal</h4>
     </div>
     <div class="modal-body" id="updateamc">
      </div>
     <div class="modal-footer">
       <!--<button type="button" class="btn dark btn-outline" data-dismiss="modal">Close</button>
       <button type="button" class="btn green">Save changes</button>-->
     </div>
   </div>
   <!-- /.modal-content -->
 </div>
 <!-- /.modal-dialog -->
</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' ]
       ]
      } );

       //
     }
   });


});

// 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();
   }
 });
});

function amcinsert()
{

       //show loading


   postvalue=($('#amcinsert_form').serialize());
   $.ajax({
     type: "POST",
     url: "add_details.php?type=1&pid=2_3_1",
     data: postvalue,



     success: function(msg) {
       result=msg.split('|');
         if(result[0]=="1")
         {
               alert("Given Information added successfully");
			  $('#updateamcmodel').modal('hide');
			   refereshtable();
             // $('#serviceresult').modal('show');
         }
         else {
             alert("Please try once again!");
         }


       //
     }
   });


}
function insertamc(value)
{
var fromdate=$('#fromdate').val();
       $.ajax({
     type: "POST",
     url: "ajax/loaddata.php",
     data: {type:"2",pageid:"2_3_1",sales_all_id:value,fromdate:fromdate},
     success: function(msg) {
       $('#updateamc').html(msg);
        $('#searchloadingnew').hide();
       $('#updateamcmodel').modal('show');

     }
   });
}



function refereshtable()
{
 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' ]
       ]
      } );

       //
     }
   });

}



</script>