<?php
session_start();
header("Content-type: text/html; charset=utf8");
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");

mysql_query("SET NAMES 'utf8'"); 
mysql_query('SET CHARACTER SET utf8'); 
mysql_set_charset('utf8', $connection);



$id = $_GET['id'];
$tbname = $_GET['tbname'];
if($tbname == 'BL')
	$query = "select fullpage from archiving where auto = $id";
else if($tbname == 'GM')
	$query = "select fullpage from archivingb where auto = $id";
else if($tbname == 'DT')
	$query = "select fullpage from archivingdt where auto = $id";
//echo $query;
$res = mysql_query($query,$connection);
$row = mysql_fetch_row($res);
$vfullpage = $row[0];
?> 

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

function closepage(){
self.close();	
}

</script>
<style type="text/css">
#vfullpage { 
	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="">
  <table width="820" border="0" align="center">
  <tr><td><button type='button' id='btnPost' name='btnPost' onclick='closepage();return false;' title='Close'><span><span>Close</span></span></button></td></tr>
    <tr height='40px'>
      <th colspan="5" bgcolor="#DDDDDD"><span class="style1"> Full Page </span></th>
    </tr>
    <tr>
      <td bgcolor=""> <span id='vfullpage'><?php echo (nl2br($vfullpage));?></span></td>
    </tr>
	
  </table>
</form>
</body>
</html>
