<?php
	session_start();
include_once("../class/class.MySQL.php");
require '../class/resizeImage.php';
$db=new MySQL();

	$employee = $db->fetchQuery("Select * from employee AS employee 
							 where employee.e_status='0' ");
	
	/*echo "<pre>";
	print_r($employee);
	*/
			echo '{"employee":'.json_encode($employee).'}';
			
			
			if(isset($_GET['employee_id']))
			{
				//echo "<pre>";
			//print_r($_GET['employee_id']);
	 
				$id=$_GET['employee_id'];
				$employ=$db->DeleteAll("delete `A`,`B`,`C`,`D`,`E`  from `employee` AS A LEFT JOIN `employee_expirence` AS B ON B.e_id=A.e_id 
		LEFT JOIN  `file` AS  C ON  C.e_id=A.e_id 
		LEFT JOIN `idproof` AS D ON D.e_id=A.e_id 
		LEFT JOIN `language` AS E ON E.e_id=A.e_id
		where A.e_id='$id' ");
							
				echo '{"employee":'.json_encode($employ).'}';
			}
	
		if(isset($_REQUEST['id']))
				{
						$idn=$_REQUEST['id'];
						$opt1='';
						$where['country_id']=$idn;
						$names1 = $db->fetchAll('state',$where);
						
						//print_r($names1);
						foreach($names1 as $names1)
						{
						$opt1.="<option value='".$names1['state_id']."'>".$names1['state']."</option>";
						}
						?>
						<option value="">--select--</option>
						<?                                      
							echo $opt1;

		}
		?>
    
    
    
    
	
    
    
