$query = "
SELECT
`Messages`.`ID`,
UNIX_TIMESTAMP( `Date` ) AS `timestamp`,
DATE_FORMAT(`Date`, '$date_format') AS `Date`,
`Recipient`,
`Profiles`.`NickName` AS `SenderNickName`,
`Subject`,
`New`
FROM `Messages`
LEFT JOIN `Profiles` ON
`Profiles`.`ID` = `Recipient`
WHERE `Sender` = $memberID
ORDER BY `Date` DESC
";
I had to change a line for the function to work properly:
function PageCodeOutbox()
{
global $memberID;
global $dir;
global $site;
global $tmpl;
global $date_format;
if( $_REQUEST['do_delete'] or $_REQUEST['do_mark_new'] or $_REQUEST['do_mark_old'] )
{
if( $_REQUEST['do_delete'] )
$sqlDoQuery = "DELETE FROM `Messages` WHERE";
if( $aMsgs = $_POST['m'] and is_array( $aMsgs ) and !empty( $aMsgs ) )
{
foreach( $aMsgs as $msgID => $on )
{
$msgID see more