0){ $row = db_fetch_assoc($result); if ($row['msgfrom']==0 || !is_numeric($row['msgfrom'])){ if ($row['msgfrom'] == 0 && is_numeric($row['msgfrom'])) { $row['name']=translate_inline("`i`^System`0`i"); } else { $row['name']=$row['msgfrom']; } // No translation for subject if it's not an array $row_subject = @unserialize($row['subject']); if ($row_subject !== false) { $row['subject'] = call_user_func_array("sprintf_translate", $row_subject); } // No translation for body if it's not an array $row_body = @unserialize($row['body']); if ($row_body !== false) { $row['body'] = call_user_func_array("sprintf_translate", $row_body); } } if (!$row['seen']) { output("`b`#NEW`b`n"); }else{ output("`n"); } output("`b`2From:`b `^%s`n",$row['name']); output("`b`2Subject:`b `^%s`n",$row['subject']); output("`b`2Sent:`b `^%s`n",$row['sent']); output_notl("`n",true); output_notl(str_replace("\n","`n",$row['body'])); output_notl("`n`n",true); $sql = "UPDATE " . db_prefix("mail") . " SET seen=1 WHERE msgto=\"".$session['user']['acctid']."\" AND messageid=\"".$id."\""; db_query($sql); invalidatedatacache("mail-{$session['user']['acctid']}"); $reply = translate_inline("Reply"); $del = translate_inline("Delete"); $unread = translate_inline("Mark Unread"); $report = translate_inline("Report to Admin"); $problem = "Abusive Email Report:\nFrom: {$row['name']}\nSubject: {$row['subject']}\nSent: {$row['sent']}\nID: {$row['messageid']}\nBody:\n{$row['body']}"; rawoutput("
$reply | "); } else { rawoutput(""); } rawoutput(" | $del |
$unread | "); // Don't allow reporting of system messages as abuse. if ((int)$row['msgfrom']!=0) { rawoutput("$report | "); } else { rawoutput(""); } rawoutput(" |
"); if ($pid > 0) { rawoutput("".htmlentities($prev, ENT_COMPAT, getsetting("charset", "ISO-8859-1")).""); }else{ rawoutput(htmlentities($prev), ENT_COMPAT, getsetting("charset", "ISO-8859-1")); } rawoutput(" | "); if ($nid > 0){ rawoutput("".htmlentities($next, ENT_COMPAT, getsetting("charset", "ISO-8859-1")).""); }else{ rawoutput(htmlentities($next), ENT_COMPAT, getsetting("charset", "ISO-8859-1")); } rawoutput(" | "); rawoutput("