<?php
if (!defined('WEB_ROOT')) {
	exit;
}

if (isset($_GET['fileId']) && (int)$_GET['fileId'] > 0) {
	$fileId = (int)$_GET['fileId'];
} else {
	@header('Location: index.php');
}

$errorMessage = (isset($_GET['error']) && $_GET['error'] != '') ? $_GET['error'] : '&nbsp;';
$id = $_REQUEST["fileId"];
$sql = "SELECT *
        FROM tbl_testimonials
        WHERE Id = $id";
$result = dbQuery($sql);		
extract(dbFetchAssoc($result));



?> 
<script language="JavaScript" type="text/javascript" src="../fckeditor/fckeditor.js"></script>
 <script type="text/javascript">
	window.onload = function()
	{
	var oFCKeditor = new FCKeditor( 'txtdetail' ) ;
	oFCKeditor.BasePath = "../fckeditor/" ;
	oFCKeditor.ReplaceTextarea() ;
	}
</script>
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<p class="errorMessage"><?php echo $errorMessage; ?></p>
<form action="processFiles.php?action=modify" method="post" enctype="multipart/form-data" name="frmAddFile" id="frmAddFile" onsubmit="return validate(this)">
 <table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" class="entryTable">
  <tr>
  <td width="198" class="label">&nbsp;</td>
  <td width="1010" class="label">&nbsp;</td>
   <input name="hidFileId" type="hidden" id="hidFileId" value="<?php echo $id; ?>">
  </tr>
   <tr>
  	<td class="label">testimonials Name</td>
    <td class="content"><input name="txttitle" id="txttitle" type="text" class="formField"  value="<?php echo $Title; ?>" style="width:200px;"/></td>
  </tr>
  <tr>
    <td align="left" valign="top" class="label">testimonials Description </td>
    <td align="left" valign="middle" class="content">
    <textarea name="txtdetail" id="txtdetail" cols="45" rows="5" class="formField"><?php echo $detail; ?></textarea>   </td>
  </tr>
   <tr>
    <td class="label">&nbsp;</td>
    <td class="content">&nbsp;</td>
  </tr>
 </table>
 <p align="center"> 
  <input name="btnModifyClient" type="submit" id="btnModifyClient" value="Modify testimonials" class="button">
  &nbsp;&nbsp;<input name="btnCancel" type="button" id="btnCancel" value="Cancel" onClick="window.location.href='index.php';" class="Button">  
 </p>
</form>