<?php
//error_reporting(0);

session_start();
include_once("../class/class.MySQL.php");
$db	=new MySQL();

/* language dropdown*/
	
		$opt='';
		
if($_GET['action']=='ld_lang'){		
		$language= $db->fetchAll("language",'lang_id');
		echo '{"lang":'.json_encode($language).'}';
}

if($_GET['action']=='adm_lang'){
		$language= $db->fetchAll("language",'lang_id');
		foreach($language as $lang)
		{
		$opt.="<option value='".$lang['lang_id']."'>".$lang['language']."</option>";
		}
		?>
		<option value="">--select--</option>
		<?                                      
	    echo $opt;

}

if($_GET['action']=='rm_lang'){	
		$id = $_GET['id'];	
		$where['id']	 = $id;
		$language	     =	$db->delete('emp_language',$where);
}

?>



