<?PHP
//Filename : message_send.php
//Description : Send an intra-site message
//Author : darc
//Last modified : 2006.12.20
include '../includes/auth.php';
include '../includes/db.php';
?>
<html>
<head><title>Gsys :: Send Message</title><link href="../includes/index.css" rel="stylesheet" type="text/css"></head>
<body class="body">
<br />
<table width="810" height="626" border="0" align="center" cellpadding="15">
<tr>
<td height="128" colspan="2"><img src="../images/eg_banner.gif" width="810" height="172"></td>
</tr>
<tr>
<td width="27%" height="488" valign="top"> <?php include '../includes/nav.inc'; ?></td>
<td width="53%" align="center">
<center><strong>Send Message</strong></center>
<br /><br />
<form method="post" action="message_functions.php?cat=do_send_message">
<input type="hidden" name="sender_pin" value="<?php session_start(); echo $_SESSION[pin_num]; ?>">
<br />
<strong>Send To:</strong><SELECT NAME="member_pin">
<OPTION VALUE="">
<?php //populate list with active users
$sql = "SELECT pin_num, l_name, f_name, status FROM brothers WHERE status=\"active\" && l_name != \"\" || status=\"pledge\" && l_name != \"\" ORDER BY l_name;";
$result = mysql_query($sql,$connection) or die(mysql_error);
while($row =mysql_fetch_array($result))
{
$l_name = $row['l_name'];
$f_name = $row['f_name'];
$pin_num_tmp = $row['pin_num'];
echo "<OPTION VALUE=\"$pin_num_tmp\">$l_name, $f_name";
}
?>
</SELECT>
<br /><br />
<strong>Title:</strong>
<INPUT TYPE="text" NAME="title" SIZE="20"><br /><br />
<strong>Message:</strong><br />
<textarea cols="40" rows="5" name="message"></textarea>
<br /><br />
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="Send Message">
</form>
</td>
</tr>
</table>
</body>
</html>