<?php
session_start();
header("Content-type: text/html; charset=".$_SESSION['encodingmode']);
include("config.inc.php");

$connection = mysql_connect($config['dbServer'],$config['dbUser'],$config['dbPass']) or die("Could not connect to DB");
mysql_select_db($_SESSION['dbName'],$connection) or die("Could not find DB");

if(	$_SESSION['encodingmode'] == 'utf8' || $_SESSION['encodingmode'] == 'utf-8'){
	mysql_query("SET NAMES 'utf8'"); 
	mysql_query('SET CHARACTER SET utf8'); 
	mysql_set_charset('utf8', $connection);
}
$query1="select grid_color1,grid_color2 from setup";
$result1=mysql_query($query1,$connection) or die(mysql_error());
while($rows=mysql_fetch_array($result1)){
	extract($rows);
}

$frm = $_POST['frm']; if($frm == '') $frm = $_GET['frm'];
$index = $_POST['index']; if($index == '') $index = $_GET['index'];
$vdetaildesc = $_GET['sorderdtdesc'];


?>

<!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>TEXT</title>
<link rel="stylesheet" type="text/css" media="all" href="css-v2/style.css">
<script type="text/javascript" language="javascript">

function ClearPage()
{
  document.form1.vdetaildesc.value='';
  document.form1.action='form_descText.php';
  document.form1.submit();
}
function SaveChanges(){
var index = document.form1.index.value;
opener.document.getElementById("sordtdesc1["+index+"]").value=document.form1.vdetaildesc.value;

self.close();	
}

</script>
<style type="text/css">
textarea { 
	resize: vertical; 
	width: 835px;
	height: 600px;
	}

body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 14px;
}
.style1 {
	color: #333333;
	font-weight: bold;
}
.style2 {
	color: #999999;
	font-weight: bold;
}
.style3 {color: #999999}

</style></head>

<body>
<form id="form1" name="form1" method="post" action="">
<input type='hidden' name='index' id='index' value="<?php echo $index;?>">
  <table width="820" border="0" align="center">
  <tr><td><button type='button' id='btnClear' name='btnClear' onclick='ClearPage();return false;' title='Clear Page'><span><span>Clear Page</span></span></button>
  <button type='button' id='btnPost' name='btnPost' onclick='SaveChanges();return false;' title='Save Changes'>
  <span><span>Save</span></span></button></td></tr>
    <tr height='40px'>
      <th colspan="5" bgcolor="#DDDDDD"><span class="style1"> Additional Details </span></th>
    </tr>
    <tr>
      <td bgcolor="#DDDDDD"> <textarea name='vdetaildesc' id='vdetaildesc'><?php echo $vdetaildesc;?></textarea></td>
    </tr>
	
  </table>
</form>
</body>
</html>
