<?php
include "chkuser.php";
include "includefilemng.php";
if(isset($_GET['id']))
{    $id = $_GET['id'];
	 $sql = "SELECT draft_mail_id,draft_content FROM draft_mail_table where draft_mail_id='$id'";
	 $result = mysql_query($sql,$eclipse); 
	 while ($row = mysql_fetch_object($result))
			{
			$content = htmlentities($row->draft_content);
			}
}

?>
<html>
<head>
<title>control panel </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="ssi.css" rel="stylesheet" type="text/css">
<script language="javascript" src="includenp/functions.js"></script>
<script language="javascript" type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>

<script language="javascript" type="text/javascript">
// Notice: The simple theme does not use all options some of them are limited to the advanced theme
tinyMCE.init({
		mode : "textareas",
		theme : "advanced",
		content_css : "tiny.css",
		plugins : "advimage,paste,fullscreen,noneditable",
		theme_advanced_buttons1_add_before : "save",
		theme_advanced_buttons1_add : "fontselect,fontsizeselect",
		theme_advanced_buttons2_add : "forecolor,backcolor",
		theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
		theme_advanced_buttons3_add_before : "tablecontrols,separator",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_path_location : "bottom",	
		theme_advanced_resize_horizontal : false,
		theme_advanced_resizing : true,
		apply_source_formatting : true,
		spellchecker_languages : "+English=en"
	});
</script>

<style type="text/css">
<!--
.style2 {color: #000000}
-->
</style>
</head>
<body>
<table width="98%" border="0" cellspacing="0" cellpadding="2" align="center">
  <tr>
    <td width="1%"   bgcolor="#C9C9C9"></td>
	<td width="98%"><?php include_once "top.php";?></td>
	<td width="1%"   bgcolor="#C9C9C9"></td>
  </tr>
  <tr>
   <td width="1%"   bgcolor="#C9C9C9"></td>
    <td width="98%"><table width="100%"  border="0" cellpadding="0" cellspacing="0" class="centertable">
      <tr>
        <td><table width="80%"  border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="50" class="bigblackTxt">&nbsp;</td>
          </tr>
          <tr>
            <td class="errFont"><?php
		if(isset($rmsg))
		{echo display_error_msg($rmsg);
		   	}
		?></td>
          </tr>
          <tr>
            <td>
            
              <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="4">
               <form method="POST" action="sendmail.php" name="SaveForm" ID="SaveForm" >
                
				
                  <tr>
                    <td colspan="2" class="bigblackTxt"></td>
                  </tr>
				  <tr>
                    <td height="24" colspan="2" class="errFont"> * marked fields are mandatory </td>
                  </tr>
				  <tr>
                    <td colspan="2" class="normalBoldblackTxt"> Identification </td>
                  </tr>                 
                 
                   
                                        
				  <tr>
                    <td width="26%" class="bluebold"><span class="errFont">*</span>Subject: </td>
                    <td width="74%"><input name="subject" type="text" id="subject" size="50">
          <input name="mailtype" type="hidden" id="mailtype" value="html"></td>
                  </tr>
				  
				 
				  <tr>
                    <td width="26%" class="bluebold"><span class="bluebold"> <span class="errFont">*</span>Mail:</span></td>
                    <td width="74%"><textarea name="txtContent" cols="90" rows="20" class="inputBOX" id="Hidden1"></textarea></td>
                  </tr>
				
				  <tr>
                  <td class="bluebold">&nbsp;</td>
				    <td class="bluebold">&nbsp;</td>
				    </tr>
				  <tr>
                    <td width="26%" class="bluebold">&nbsp;</td>
                    <td width="74%"><INPUT NAME="savegau" type="submit" class="bigblackTxt" ID="savegau2"  value="MAIL"></td>
                  </tr>
				  <tr>
                    <td align="right">&nbsp;</td>
                    <td>                      <span class="normalTxt"><span class="bigblackTxt">
                    
                      </span></span></td>
                  </tr>
                  <tr>
                    <td colspan="2">&nbsp;</td>
                  </tr>
                </form>
            </table></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
    <td width="1%"   bgcolor="#C9C9C9"></td>
  </tr>
  <tr>
    <td   bgcolor="#C9C9C9" width="1%"></td>
	<td><?php include_once "footer.php";?></td>
	<td width="1%"   bgcolor="#C9C9C9"></td>
  </tr>
</table>
</body>
</html>
