1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
| // Bejövő levelek olvasása
if ($action == "read_inbox")
{
$id = (int)$_GET["id"];
if (!int_check($id)) {
exit("Érvénytelen ID.");
}
$res = mysql_query("SELECT l.id, l.added, l.msg, l.sender, l.unread, l.location, u.username FROM letters l
LEFT JOIN users u ON u.id = l.sender
WHERE l.receiver = ".sqlesc($CURUSER["id"])." AND l.location = 'in' ORDER BY l.added DESC") or die("barf!");
$arr = mysql_fetch_assoc($res);
if ($arr["unread"] == "yes") {
mysql_query("UPDATE letters SET unread = 'no' WHERE id=".(int)$arr["id"]) OR die("Hiba történt az adatbázis módosítása során!");
}
stdhead("Bejövő");
echo ("<table width='700' align='center' cellspacing='0' cellpadding='0'><tr><td>");
echo ("<div class='letters'>".$arr["msg"]."<br />Dátum: ".date("H:i", $arr["added"])."</div>");
echo ("<a href='$BASEURL/messages.php?action=send_form&id=".(int)$arr["sender"]."'>Válasz</a><br />
<a href='$BASEURL/messages.php?action=delete&id=".(int)$arr["id"]."&type=in'>Törlés</a>
<br /><a href='$BASEURL/messages.php?action=view_inbox'>Bejövő</a>");
echo ("</td></tr></table><hr class='hr' />");
stdfoot();
}
|