new PM
This commit is contained in:
@@ -122,3 +122,16 @@ if (isset($_COOKIE[$config['cookies']['mod']])) {
|
||||
);
|
||||
}
|
||||
|
||||
function create_pm_header() {
|
||||
global $mod;
|
||||
$query = prepare("SELECT `id` FROM `pms` WHERE `to` = :id AND `unread` = 1");
|
||||
$query->bindValue(':id', $mod['id'], PDO::PARAM_INT);
|
||||
$query->execute() or error(db_error($query));
|
||||
|
||||
if ($pm = $query->fetch()) {
|
||||
return Array('id' => $pm['id'], 'waiting' => $query->rowCount() - 1);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user