<?php
ob_start();
session_start();
require_once("../dbconnect.php");

$query="select * from register where user_id=".$_GET['userid'];
$exe=mysql_query($query);
$row=mysql_fetch_array($exe);

$query1="select * from admin where admin_id=1";
$exe1=mysql_query($query1);
$row1=mysql_fetch_array($exe1);


?>
<!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" />
<?php include_once("title.php");?>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="ajaxvalid.js"></script>
<style type="text/css">
<!--
.style2 {
	color: #21262A;
	font-size: 12px;
}
-->
</style>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td><? require_once("header.php"); ?></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            
              <tr>
                <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="30" class="cate_pro">Customers</td>
                      <td>&nbsp;</td>
                      <td class="index_text" align="right">&nbsp;</td>
                      <td width="20">&nbsp;</td>
                    </tr>
                </table></td>
              </tr>
              <tr>
                <td><table align="right" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="100%"><table border="0" cellpadding="0" cellspacing="0" width="100%">
                      <tbody>
                        <tr>
                          <td>Send Email To Customer</td>
                          <td align="right">&nbsp;</td>
                          <td></td>
                        </tr>
                        </tbody>
                    </table></td>
                  </tr>
                  <tr>
                    <td><table border="0" cellpadding="2" cellspacing="0" width="100%">
                        <tbody>
                          <tr>
                           
                            <td>
							<form action="sendmail.php" method="post">
							
							<table border="0" cellpadding="0" cellspacing="2">
                                <tbody>
                                  <tr>
                                    <td colspan="2"></td>
                                  </tr>
                                  <tr>
                                    <td>Customer:</td>
                                    <td width="750"><input name="to" size="50" type="text" value="<? echo $row["Email"];  ?>"/>
									<input type="hidden" name="user" value="<?  echo $row["user_id"]; ?>" />
								
									<input type="hidden" name="page" value="<?  echo $_GET['page']; ?>" />
									</td>
                                  </tr>
                                  <tr>
                                    <td colspan="2"></td>
                                  </tr>
                                  <tr>
                                    <td>From:</td>
                                    <td><input name="from" value="<? echo $row1["email"]; ?>" size="50" type="text" /></td>
                                  </tr>
                                  <tr>
                                    <td colspan="2"></td>
                                  </tr>
                                  <tr>
                                    <td>Subject:</td>
                                    <td><input name="subject" size="50" type="text"  value="Information from Bdazzled"/></td>
                                  </tr>
                                  <tr>
                                    <td colspan="2"></td>
                                  </tr>
                                  <tr>
                                    <td colspan="2"></td>
                                  </tr>
                                  <tr>
                                    <td valign="top">Text-Only <br />
                                      Message:</td>
                                    <td><textarea name="mes" wrap="soft" cols="50" rows="10"></textarea></td>
                                  </tr>
                                  <tr>
                                    <td colspan="2"></td>
                                  </tr>
								  
								     <tr>
                                    <td colspan="2"></td>
                                  </tr>
                                  <tr>
                                    <td colspan="2" align="right">&nbsp;</td>
                                  </tr>
								   <tr>
                                    <td colspan="2" align="right"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                      <tr>
                                        <td align="center">&nbsp;</td>
                                      </tr>
                                      <tr>
                                        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td width="33%" align="right">
									<input name="submit" type="image" src="images/button_send_mail.gif" align="middle" /></td>
                                            <td width="55%">&nbsp;</td>
                                            <td width="12%">&nbsp;</td>
                                          </tr>
                                        </table></td>
                                      </tr>

                                    </table>
                                    </td>
                                  </tr>
                                </tbody>
                            </table>
							
							</form>
							
							</td>
                          </tr>
                        </tbody>
                    </table></td>
                  </tr>
                </table>                </td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              
              <tr>
                <td>&nbsp;</td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>

          <tr>
            <td><? require_once("footer.php"); ?></td>
          </tr>
          <tr>
            <td>&nbsp; </td>
          </tr>
        </table>
</body>
</html>
