2011-03-28 14:21:28 +00:00
|
|
|
<?
|
|
|
|
|
2013-05-04 08:00:48 +00:00
|
|
|
if (empty($Return)) {
|
2011-03-28 14:21:28 +00:00
|
|
|
$ToID = $_GET['to'];
|
2013-05-04 08:00:48 +00:00
|
|
|
if ($ToID == $LoggedUser['ID']) {
|
2013-05-30 08:00:30 +00:00
|
|
|
error('You cannot start a conversation with yourself!');
|
2013-06-12 08:00:46 +00:00
|
|
|
header('Location: ' . Inbox::get_inbox_link());
|
2011-03-28 14:21:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-05-04 08:00:48 +00:00
|
|
|
if (!$ToID || !is_number($ToID)) {
|
|
|
|
error(404);
|
|
|
|
}
|
2011-03-28 14:21:28 +00:00
|
|
|
|
2013-05-04 08:00:48 +00:00
|
|
|
if (!empty($LoggedUser['DisablePM']) && !isset($StaffIDs[$ToID])) {
|
2011-03-28 14:21:28 +00:00
|
|
|
error(403);
|
|
|
|
}
|
|
|
|
|
2013-06-05 08:01:01 +00:00
|
|
|
$DB->query("
|
|
|
|
SELECT Username
|
|
|
|
FROM users_main
|
|
|
|
WHERE ID='$ToID'");
|
2011-03-28 14:21:28 +00:00
|
|
|
list($Username) = $DB->next_record();
|
2013-05-04 08:00:48 +00:00
|
|
|
if (!$Username) {
|
|
|
|
error(404);
|
|
|
|
}
|
2013-05-21 08:01:09 +00:00
|
|
|
View::show_header('Compose', 'inbox,bbcode,jquery,jquery.validate,form_validate');
|
2011-03-28 14:21:28 +00:00
|
|
|
?>
|
|
|
|
<div class="thin">
|
2012-08-19 08:00:19 +00:00
|
|
|
<div class="header">
|
|
|
|
<h2>Send a message to <a href="user.php?id=<?=$ToID?>"><?=$Username?></a></h2>
|
|
|
|
</div>
|
2012-09-15 08:00:25 +00:00
|
|
|
<form class="send_form" name="message" action="inbox.php" method="post" id="messageform">
|
2011-03-28 14:21:28 +00:00
|
|
|
<div class="box pad">
|
|
|
|
<input type="hidden" name="action" value="takecompose" />
|
|
|
|
<input type="hidden" name="toid" value="<?=$ToID?>" />
|
|
|
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
|
|
|
<div id="quickpost">
|
|
|
|
<h3>Subject</h3>
|
2013-05-21 08:01:09 +00:00
|
|
|
<input type="text" class="required" name="subject" size="95" value="<?=(!empty($Subject) ? $Subject : '')?>" /><br />
|
2011-03-28 14:21:28 +00:00
|
|
|
<h3>Body</h3>
|
2013-05-30 08:00:30 +00:00
|
|
|
<textarea id="body" class="required" name="body" cols="95" rows="10" onkeyup="resize('body')"><?=(!empty($Body) ? $Body : '')?></textarea>
|
2011-03-28 14:21:28 +00:00
|
|
|
</div>
|
|
|
|
<div id="preview" class="hidden"></div>
|
|
|
|
<div id="buttons" class="center">
|
2013-02-22 08:00:24 +00:00
|
|
|
<input type="button" value="Preview" onclick="Quick_Preview();" />
|
2011-03-28 14:21:28 +00:00
|
|
|
<input type="submit" value="Send message" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<?
|
2012-10-11 08:00:15 +00:00
|
|
|
View::show_footer();
|
2012-09-19 08:00:35 +00:00
|
|
|
?>
|