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/mas_customer.php
<div id="contentwrapper">
	    <div class="main_content">
       	  
 <?php
		  $up=$_REQUEST['up'];
		  $id=$_REQUEST['id'];
		  if($up==1)
		  {
		  $sql="select * from employee where EMP_ID=".$id." and EMP_UPDATE='1'";
		  
		  $qu=mysql_query($sql);
		  $r=mysql_fetch_array($qu);
		  
		  $EMP_CODE=$r['EMP_CODE'];	 
		  $EMP_NAME=$r['EMP_NAME'];
		  $EMP_MOBILE=$r['EMP_MOBILE'];
		  $EMP_DOJ= date('d-m-Y', strtotime($r['EMP_DOJ']));
		
		  }
		  ?>
		  		  
	                      <div class="page-head">
                                <div class="container">
                                    <!-- BEGIN PAGE TITLE -->
                                    <div class="page-title">
                                        <h1>Customer Master <small>Manage your customers.</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="<?php if($up==1)echo "up"; else echo "ad";?>d_details.php?mid=<?php echo $mid;?>&smid=<?php echo $smid;?>&pid=<?php echo $pid;?>" method="post">
					<div class="portlet light">
					  
						 <div class="row">
                          <div class="col-md-12">
						    <div class="col-md-3">						   
								   
								<label>Customer Name <span class="f_req">*</span></label>
								<input name="EMP_NAME" type="text" class="form-control" id="EMP_NAME" value="<?php echo $EMP_NAME;?>" />
								<span class="help-block">Enter customer name </span>
								   </div>
								       <div class="col-md-3">						   
								   
								<label>Customer Address <span class="f_req">*</span></label>
								<input name="EMP_MOBILE" type="text" class="form-control" id="EMP_MOBILE" value="<?php echo $EMP_MOBILE;?>" />
								<span class="help-block">Enter customer name </span>
								   </div>
								       <div class="col-md-3">						   
								   
								<label>Customer Area <span class="f_req">*</span></label>
								<input name="cust_area" type="text"   id="cust_area" class="form-control" value="<?php echo $EMP_DOJ;?>" />
									<!--class="form-control date-picker" data-date-format="dd-mm-yyyy"-->
											
								   </div>	
								   
								     <div class="col-md-3">						   
								   
								<label>Surround Area <span class="f_req">*</span></label>
								<input name="surround_area" type="text" id="surround_area" class="form-control" value="<?php echo $EMP_DOJ;?>" />
							
								   </div>	
           				  </div>
					      </div>
						  
						   <div class="row">
                          <div class="col-md-12">
						    <div class="col-md-3">						   
								   
								<label>City<span class="f_req">*</span></label>
								<input name="EMP_NAME" type="text" class="form-control" id="EMP_NAME" value="<?php echo $EMP_NAME;?>" />
							<span class="help-block">Enter city </span>
								   </div>
								       <div class="col-md-3">						   
								   
								<label>Phone <span class="f_req">*</span></label>
								<input name="EMP_Phone" type="text" class="form-control" id="EMP_Phone" value="<?php echo $EMP_MOBILE;?>" />
								
								   </div>
								       <div class="col-md-3">						   
								   
								<label>Mobile<span class="f_req">*</span></label>
								<input name="cust_Mobile" type="text" class="form-control"   id="cust_Mobile" value="<?php echo $EMP_DOJ;?>" />
									<!--class="form-control date-picker" data-date-format="dd-mm-yyyy"-->
											
								   </div>	
								   
								     <div class="col-md-3">						   
								   
								<label>Contact Person<span class="f_req">*</span></label>
								<input name="surround_area" type="text" class="form-control"  id="surround_area" value="<?php echo $EMP_DOJ;?>" />
							
								   </div>	
           				  </div>
					      </div>
				     <div class="row">
                          <div class="col-md-12">
								
							    <div class="col-md-3">
							  <label>Customer Code<span class="f_req">*</span></label>
								<?php  echo $r['EMP_CODE'];?>
           				  </div>
						 		
					      </div>
					 </div>
					 
					 					 
					 
					 <div class="form-actions">
                                                                <div class="row">
                                                                    <div class="col-md-offset-3 col-md-9">
                                                                        <button type="submit" class="btn green">Submit</button>
                                                                        <button type="button" class="btn grey-salsa btn-outline cancel">Cancel</button>
                                                                    </div>
                                                                </div>
                                                            </div>
					 </div>

				</form>
				
				
				
				
				
                                        <div class="row portlet light">
										
										 
										  <div class="col-md-12">
	
        <h3 class="heading">View / Search / Update Customer </h3>
	
		<div class="col-md-12">
			    <div class="col-md-3">
											<label> Search by :</label>
											
											<select name="Search" class="form-control" id="search" >
                                  <option value="Select">Select Menu</option>
                                  <option value="Customer_Name">Customer Name</option>
								  <option value="Customer_Address">Customer Address</option>
								  <option value="Customer_Area">Customer Area</option>
                                  <option value="Surround_Area">Surround Area</option>
								  <option value="City">City</option>
								  <option value="Phone">Phone</option>
								   <option value="Mobile">Mobile</option>
								    <option value="Contact_Person">Contact Person</option>
									
								  
                                </select>
                               
                  </span></div>
								
								 <div class="col-md-3">
											<label> Search Text :</label>
											<input type="text" id="searchtext" name="searchtext" class="form-control" value="<?php echo $searchtext;?>" />
								 </div>
								  <div class="col-md-3">
								  </br>
								 
										   <button class="btn  btnsearch green">Submit</button>
										   
								 </div>
								 
								
										 </div>
		
		<table class="table table-striped table-bordered table-hover dt-responsive" id="sample">
            <thead>
				<tr>
					<th>S.No.</th>
					<th>Customer Name </th>
					<th>Customer Address </th>
					<th>Customer Area </th>
					<th>Surround Area </th>
					<th>City </th>
					<th>Phone </th>
					<th>Mobile</th>
					<th>Contact Person</th>
					<th>Update</th>
					<th>Delete</th>
				</tr>
			</thead>
			<tbody>
			<?php
			$sql1="select * from customer where CUSTOMER_UPDATE='1' limit 1,100  ";
			$qu1=mysql_query($sql1);
			$i=1;
			while($rd=mysql_fetch_array($qu1))
			{
			
			?>
				<tr>
					<td><?php echo $i;?></td>
					<td><?php echo $rd['CUSTOMER_NAME'];?></td>
					<td><?php echo $rd['CUSTOMER_ADDRESS'];?></td>
					<td><?php echo $rd['CUSTOMER_AREA'];?></td>
					<td><?php echo $rd['CUSTOMER_SURROUND_AREA'];?></td>
					<td><?php echo $rd['CUSTOMER_CITY'];?></td>
					
					<td><?php echo $rd['CUSTOMER_PHONE'];?></td>
					<td><?php echo $rd['CUSTOMER_MOBILE'];?></td>
					<td><?php echo $rd['CUSTOMER_CONTACT_PERSON'];?></td>
										
										
					<td class="center"><a href="landing.php?mid=<?php echo $mid;?>&smid=<?php echo $smid;?>&pid=<?php echo $pid;?>&amp;id=<?php echo $rd['CUSTOMER_CODE'];?>&amp;up=1" class="sepV_a" title="Edit"><i class="icon-pencil"></i></a></td>
					<td class="center"><a href="del_detail.php?mid=<?php echo $mid;?>&smid=<?php echo $smid;?>&pid=<?php echo $pid;?>&amp;id=<?php echo $rd['CUSTOMER_CODE'];?>" onClick="return confirm('Are you sure you wish to delete this record ?')" title="Delete"><i class="icon-trash"></i></a></td>
				</tr>
			<?php $i++; }?>
			</tbody>        
		</table>
		
		
			
		    </div>
			</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();
});
$('.btnsearch').click(function()
{
location.reload();
});

});

$("form[name='serchform']").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
      Search: "required",
      searchtext: "required"
    },
    // Specify validation error messages
    messages: {
      Search: "Please select search by",
      searchtext: "Please enter employee mobile"
    },
    // 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>