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_area.php


 <div id="contentwrapper">
	    <div class="main_content">
       	  
 <?php
		  $up=$_REQUEST['up'];
		  $id=$_REQUEST['id'];
		  if($up==1)
		  {
		  $sql="select * from area where AREA_ID=".$id." and AREA_UPDATE='1'";		  
		  $qu=mysql_query($sql);
		  $r=mysql_fetch_array($qu);		  
		  $AREA_NAME=$r['AREA_NAME'];	
		  $AREA_ID=$r['AREA_ID']; 		 	
		  }
		  ?>
		  		  
	                      <div class="page-head">
                                <div class="container">
                                    <!-- BEGIN PAGE TITLE -->
                                    <div class="page-title">
                                        <h1>Area Master <small>Manage your Area.</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 "ad"; 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>Area Name <span class="f_req">*</span></label>
						<input name="AREA_NAME" type="text" class="form-control" id="AREA_NAME" value="<?php echo $AREA_NAME;?>" />
						<input name="AREA_ID" type="hidden" class="form-control" id="AREA_ID" value="<?php echo $AREA_ID;?>" />
						<span class="help-block">Please enter area </span>		
									
						   </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 Employee </h3>
		
		
		<table class="table table-striped table-bordered table-hover dt-responsive" id="sample">
            <thead>
				<tr>
					<th>S.No.</th>
				<!--	<th>Area ID </th>-->
					<th>Area Name </th>
					
					<th>Update</th>
					<th>Delete</th>
				</tr>
			</thead>
			<tbody>
			<?php
			$sql1="select * from area where AREA_UPDATE='1'";
			$qu1=mysql_query($sql1);
			$i=1;
			while($rd=mysql_fetch_array($qu1))
			{
			
			?>
				<tr>
					<td><?php echo $i;?></td>
					<!--<td><?php echo $rd['AREA_ID'];?></td>-->
					<td><?php echo $rd['AREA_NAME'];?></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['AREA_ID'];?>&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['AREA_ID'];?>" 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();
});
});

// 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>