<?php
session_start();
require 'include/configurations.php'; // ITECHBIDS Configuration File
require 'include/header.php';
?>
<?

if(isset($_REQUEST['update1']))
{
$content=$_POST[registration];
$content=stripslashes($content);
$content=str_replace("'" , "\'" , $content);
 $query = "update terms set term_body='$content' where term_id='1' ";
if(mysql_query($query))
echo "<br><font color='#ff0000'><strong>   Updated Successfully ! </strong></font><br><br>";
}

if(isset($_REQUEST['update2']))
{
$content=$_POST[selling];
$content=stripslashes($content);
$content=str_replace("'" , "\'" , $content);
 $query = "update terms set term_body='$content' where term_id='2' ";
if(mysql_query($query))
echo "<br><font color='#ff0000'><strong>  Updated Successfully ! </strong></font><br><br>";
}

if(isset($_REQUEST['update3']))
{
$content=$_POST[buying];
$content=stripslashes($content);
$content=str_replace("'" , "\'" , $content);
 $query = "update terms set term_body='$content' where term_id='3' ";
if(mysql_query($query))
echo "<br><font color='#ff0000'><strong>  Updated Successfully ! </strong></font><br><br>";
}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<br>

<? 
if($_REQUEST['page']==1)
{
?>   
<?
$query="select * from terms where term_id=1";
$tab=mysql_query($query);
if($row=mysql_fetch_array($tab))
{
$registration=$row['term_body'];
}
?>
<table width="80%"  border="0" cellpadding="5" cellspacing="1" class="ft" align="center">
<form name="frmsearch" action="<?= $_SERVER['php_self'] ?>" method="post">
<tr class="ct" height="25">
<td colspan="4">Terms And Conditions</td>
<tr ><td>
 <?php
include_once("../HTMLEditor/fckeditor.php") ;
?>
<?php
$oFCKeditor = new FCKeditor('registration') ;
$oFCKeditor->BasePath = '/HTMLEditor/' ;
$oFCKeditor->Value = $registration;
$oFCKeditor->Create() ;
?>
</td></tr>
<input type="hidden" name="term_id" value="1">
<tr ><td align="center"> <input type="submit" class="button"   name="update1" value="Update"  value="<?= $submit; ?>"> </td></tr>
</table>
<?
}
if($_REQUEST['page']==2)
{
?>
<?
$query="select * from terms where term_id=2";
$tab=mysql_query($query);
if($row=mysql_fetch_array($tab))
{
$selling=$row['term_body'];
}
?>
<table width="80%"  border="0" cellpadding="5" cellspacing="1" class="ft" align="center">
<form name="frmsearch" method="post">
<tr class="ct" height="25">
<td colspan="4">Privacy</td>
<tr ><td>
 <?php
include_once("../HTMLEditor/fckeditor.php") ;
?>
<?php
$oFCKeditor = new FCKeditor('selling') ;
$oFCKeditor->BasePath = '/HTMLEditor/' ;
$oFCKeditor->Value = $selling;
$oFCKeditor->Create() ;
?>
</td></tr>
<input type="hidden" name="term_id" value="2">
<tr ><td align="center"> <input type="submit" class="button"   name="update2" value="Update"  value="<?= $submit; ?>"> </td></tr>
</table>
<?
}
if($_REQUEST['page']==3)
{
?>
<?
$query="select * from terms where term_id=3";
$tab=mysql_query($query);
if($row=mysql_fetch_array($tab))
{
$buying=$row['term_body'];
}
?>
<table width="80%"  border="0" cellpadding="5" cellspacing="1" class="ft" align="center">
<form name="frmsearch" method="post">
<tr class="ct" height="25">
<td colspan="4">About Us</td>
<tr ><td>
 <?php
include_once("../HTMLEditor/fckeditor.php") ;
?>
<?php
$oFCKeditor = new FCKeditor('buying') ;
$oFCKeditor->BasePath = '/HTMLEditor/' ;
$oFCKeditor->Value = $buying;
$oFCKeditor->Create() ;
?>
</td></tr>
<input type="hidden" name="term_id" value="3">
<tr ><td align="center"> <input type="submit" class="button"   name="update3" value="Update"  value="<?= $submit; ?>"> </td></tr>
</table>


<?
}
?>
<br><br>
<? require 'include/footer.php'; ?>
</body>
</html>
