<?php session_start();  //Developed by ITechScripts
$username=$_SESSION['adminuser'];
	require 'include/configurations.php'; // ITECHBIDS Configuration File
    require 'include/header.php';
	$canChange=$_POST['canChange'];
	$lang_query="select * from language where auto=1";
	$lang_result=mysql_query($lang_query);
	$lang_row=mysql_fetch_array($lang_result);
	$defaultlang =$lang_row['filename'];
?>
<?

$filename = $defaultlang;

if($_POST['Submit']){
$open = fopen("../language/emails/$filename","w+");
$text = $_POST['update'];
$text = stripslashes($text);
fwrite($open, $text);
fclose($open);
$file = file("../language/emails/$filename");
foreach($file as $text) {
}}
$file = file("../language/emails/$filename");
?>

<table border="0" align="center" width="80%" cellpadding="5" cellspacing="2" class="ft">

<form name="frmLevel" action="<? $_SERVER['PHP_SELF']?>" method="post">

<tr class="ct" height="25"><td colspan="2">Edit Email</td></tr>

<tr ><td align="center">

<textarea Name="update" cols="50" rows="10">
<?
foreach($file as $text) {
echo $text;
}
?>
</textarea><BR><BR>
<input name="Submit" type="submit" class="button" value="Update" />

</td></tr>

</form>

</table>
<?
require 'include/footer.php';
?>