';
switch(@$_GET['i']) {
case 'compose':
print '
Compose Message
';
print '
';
break;
case 'read':
if(!isset($_GET['id']) || empty($_GET['id'])) {
print 'No ID specified';
break;
}
$id = $_GET['id'];
if((!is_numeric($id)) || (!preg_match('/[0-9]+/', $id))) {
print 'Invalid ID specified.';
break;
}
$msgQuery = $database->prepare("SELECT * FROM `flashii_messages` WHERE `id` = ?");
$msgQuery->bind_param('s', $id);
$msgQuery->execute();
$msgResult = $msgQuery->get_result();
$msgArray = $msgResult->fetch_array(MYSQLI_ASSOC);
$msgQuery->close();
if(!in_array($_SESSION['uid'], unserialize($msgArray['toUsers']))) {
print 'You are not authorised to read this message.';
break;
}
print '
';
print $msgArray['title'];
print '
';
print '» From
';
print $flashii->getUserdata($msgArray['fromUser'])['username'];
print ' on ';
print date($fwSettings['dateFormat'], $msgArray['date']);
print '
';
print $parser->text($msgArray['content']);
print '
';
break;
case 'sent':
$msgQuery = $database->query("SELECT * FROM `flashii_messages`");
$msgArray = $msgQuery->fetch_all(MYSQLI_ASSOC);
$inboxArr = [];
foreach($msgArray as $key => $value) {
if($value['fromUser'] == $_SESSION['uid'])
$inboxArr[$key] = $value;
}
?>
query("SELECT * FROM `flashii_messages`");
$msgArray = $msgQuery->fetch_all(MYSQLI_ASSOC);
$inboxArr = [];
foreach($msgArray as $key => $value) {
if(in_array($_SESSION['uid'], unserialize($value['toUsers'])) && (empty($msg['deletedBy']) || !in_array($_SESSION['uid'], unserialize($value['deletedBy']))))
$inboxArr[$key] = $value;
}
?>
';
}
} else {
?>
Login to view this page!
If you actually are logged in something went wrong and you should report this to
Flashwave.
If you aren't logged in please log in or create an account if you don't have one.