<?php
session_start();
 if(!($_SESSION['log'])){
	  header("Location:index.php");
	  }
	  //include("../fckeditor.php");
	
	include('includes/php/dbconnection.php');
	 $loginQuery = "SELECT * FROM contact_email WHERE id='1'";
	 $loginResult = mysql_query($loginQuery)or die(mysql_error());
	 $row=mysql_fetch_array($loginResult);
	 
	 if($_REQUEST['edit'] == "true")
	{
		$msg = "Email Has Been Edited Successfully";
	}
	else
	{
		$msg = "";
	}
	 ?>
	
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><?php echo $page_title;?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script language="JavaScript">
function validatePassword(id)
{
		document.form1.action = "contactus2.php";
		document.form1.submit();
}
</script>
<link href="includes/css/main.css" rel="stylesheet" type="text/css">
<link href="includes/css/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #999999}
.style3 {color: #2788BF; }
-->
</style>
</head>
<body topmargin="0" bottommargin="0">
<table width="80%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0"  class="border-leftt">
  <tr> 
    <td height="10" colspan="2"><?php include('includes/php/top.php'); ?></td>
  </tr>
  <tr> 
     <td width="25%" valign="top" align="center"  bgcolor="#F2F2F4" style="padding-top:10px" class="cat_repeat"><?php include("includes/php/left_new.php");?></td>
    <td width="75%"  valign="top" class="border-right">
<form name="form1" method="post" action="" enctype="multipart/form-data">
  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" >
    <tr>
      <td  colspan="2">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2" class="heading-nml">Contact Email</td>
    </tr>
	<tr>
      <td height="44" colspan="2" align="center" class="err-mesage"><?php echo $msg; ?></td>
    </tr>
	
	
	
	<tr>
      <td height="70" align="right"  class="lbl-text" valign="top">Discription :</td>
      <td><textarea name="discription" id="discription" style="width:252px;margin-left:5px;height:70px;"  class="text-field"><?php echo $row['discription']; ?></textarea></td>
	</tr>
	<tr>
      <td height="61" align="right"  class="lbl-text" valign="top">Address : </td>
      <td><textarea name="address" id="address" class="text-field" style="width:252px; height:50px;margin-left:5px;"><?php echo $row['address']; ?></textarea> </td>
	</tr>
	<tr>
      <td height="34" align="right"  class="lbl-text" valign="middle">Fax : </td>
      <td><input name="fax" type="text" class="text-field" id="fax" value="<?php echo $row['fax']; ?>" style="width:252px; margin-left:5px;"></td>
	</tr>
	<tr>
      <td height="33" align="right"  class="lbl-text" valign="middle">Telephone :</td>
      <td><input type="text" name="phone" id="phone" value="<?php echo $row['phone']; ?>" class="text-field" style="width:252px;margin-left:5px;"></td>
	</tr>
	<tr>
      <td height="25" align="right"  class="lbl-text" valign="middle">Email : &nbsp;</td>
      <td align="left"><input type="text" name="txtemail" class="text-field" style="width:252px;margin-left:5px;" value="<?php echo $row['contactus']; ?>"></td>
	</tr>
	<tr>
      <td width="32%" >&nbsp;</td>
      <td width="68%" align="left">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2" align="center">
          <input name="changepass" type="button" class="button" id="changepass"  onClick="javascript:validatePassword();" value="Save">
        &nbsp;&nbsp;
        <input name="reset"  type="button" class="button" value="Cancel" onClick="window.location.href='welcome.php';">
        &nbsp;&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2">&nbsp;</td>
    </tr>
  </table>
</form>
    </td>
  </tr>
  <tr> 
    <td height="10" colspan="2"><?php include('includes/php/bottom.php'); ?></td>
  </tr>
</table>
</body>
</html>
