<?php

$file = __FILE__;
include ("inc/inc_common.php");
include ("inc/inc_connect.php");
include ("inc/inc_admincheck.php");
include ("inc/inc_getdate.php");
include ("inc/inc_forumname.php");
$page = "Inbox";
$pagelink = $file;
include("inc/inc_setonline.php");
$title = "Inbox";
include ("inc/inc_head.php");
include ("inc/inc_body.php");
$title = "Inbox";
include ("inc/inc_title.php");

print "</centeR><table border=0 width=\"100%\" cellpadding=1 cellspacing=0><tr><td  width=\"20%\">
<table border=0 cellpadding=1 cellspacing=0><tr><td>
<font face=\"$font\" size=$fontsize><image src=\"images/folder_icon.gif\">&nbsp;<a href=\"index.php\">$name1&nbsp;Home</a>
</td></tr>
<tr><td><image src=\"images/folder_line.gif\">
<font face=\"$font\" size=$fontsize><image src=\"images/folder_icon.gif\">&nbsp;<a href=\"inbox.php\">Inbox</a></td></tr>
<tr><td><font face=\"$font\" size=$fontsize>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<image src=\"images/folder_line.gif\">
<image src=\"images/open_folder_icon.gif\">&nbsp;Create Message</td></tr>

</table>
</td><td><center>";

include ("inc/inc_navigation.php");
include ("inc/inc_newmailsdisplay.php");
print "</td></tr></table><br><br><center>";

//end of include files...

?>

<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="80%">
    <tr>
      <td width="100%" bgcolor=<?php print "$fgcolour"; ?> align="center">
      <p align="right">
      <a href="inbox.php"><img border="0" src="images/inbox.gif"></a>
    </td>
  </tr>
</table>

<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="80%"><tr><td><center><br>
<form action="inbox_sendmail.php" method="POST"><font face=<?php print "$font"; ?> size=2>
Type a member name&nbsp;<input type="text" onfocus="document.onkeypress=function(){};" value="<?php print "$to"; ?>" name="to" style="background-image: url('images/textbox_background.gif')">&nbsp;

<?php
if (isset($to))
{
    print "<br><br>";
}
else
{
    // strange variable name below because it just wouldn't work with '0'. I kept it for the sake of it...

    print "or &nbsp;<select name=\"too\" width=\"1\">
    <option selected value=\"randomvariablehere\">Choose from buddy list</option>";

    $result = mysql_query( "SELECT * FROM $buddytable WHERE strName = '$gfcookie[1]'" );
    $num_rows = mysql_num_rows( $result );
    //Display Records
    while ( $a_row = mysql_fetch_object( $result ) )
    {
        print "<option value=\"$a_row->strBuddyName\">$a_row->strBuddyName</option>";
    }

    print "</select><br><br>";
}


print "Subject <input type=\"text\" onfocus=\"document.onkeypress=function(){};\" value=\"$subject\" name=\"subject\" style=\"background-image: url('images/textbox_background.gif')\">

<br><br>

Your Message<br><br>

<textarea onfocus=\"document.onkeypress=function(){};\" name=\"message\" cols=30 rows=6 style=\"background-image: url('images/textarea_background.gif')\"></textarea>


<input type=\"hidden\" value=\"$id\" name=\"id\">

<br><br>

<input type=\"submit\" value=\" Send \" name=\"B1\">

</form>
</td></tr></table>";


include("inc/inc_footer.php")
?>


</html>