 <?php
 include("../includes/site_config.php");
include('../functions.php');
$id=clearInput($_REQUEST['lan']);
 
 if(isset($_REQUEST['update'])){

 if($_REQUEST['default']=='EN'){$active='1';}else{$active='0';}
 
 $upd=mysql_query("UPDATE langfile update lang_active='$active'");
 }
 
$query="SELECT * FROM langfile where lang_id='$id'";
$res = mysql_query($query,$link);
$lang = mysql_fetch_object($res);

$lang_default = ($lang->lang_active==1) ? "checked" : "";
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.text {font-size:11px;
}
-->
</style>
</head>

<body>
<form action="<?=$_SERVER['PHP_SELF']?>" method="post">
<table width="100%" border="0" cellpadding="3" cellspacing="2">
  <tr>
    <td colspan="2" bgcolor="#E6E6E6"><strong>Edit Language </strong> </td>
  </tr>
  <tr>
    <td bgcolor="#E6E6E6">&nbsp;</td>
    <td bgcolor="#E6E6E6">&nbsp;</td>
  </tr>
  <tr>
    <td width="250" bgcolor="#e6e6e6" class="text"><strong>
     Language
    </strong></td>
    <td bgcolor="#e6e6e6" class="text"><?=$lang->lang_name?></td>
  </tr>
  <tr>
    <td bgcolor="#e6e6e6" class="text">Make Default </td>
    <td bgcolor="#e6e6e6" class="text"><input type="checkbox" name="default" <?=$lang_default?> value="<?=$lang->lang_id?>" /></td>
  </tr>
  <tr>
    <td bgcolor="#e6e6e6" class="text">&nbsp;</td>
    <td bgcolor="#e6e6e6" class="text">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#e6e6e6" class="text"><div align="center">
      <input type="hidden" name="lan" value="<?=$_REQUEST['id']?>" />
      <input name="update" type="submit" value="Update"/>
    </div></td>
  </tr>
</table></form>
</body>
</html>
