if($do == "read"){
$id = $_GET['id'];
if($from == "me") {
if(($SQL->getMailInfo($id, 'nadawca')) == "$_SESSION[login]"){
echo "<center><b><img src='../../layouts/".$layout."/images/others/blok.bmp'/></br> Wysłałeś następującą wiadomość do ".$SQL->getMailInfo($id, 'odbiorca')."!</br>
<img src='../../layouts/".$layout."/images/others/blok.bmp'/></br>
<u>".$SQL->getMailInfo($id, 'tytul')."</u></br></br>".$SQL->getMailInfo($id, 'tresc')."</br></br>
<img src='../../layouts/".$layout."/images/others/blok.bmp'/></br></br>
<a href='?subtopic=mailbox&action=send&repn=".$SQL->getMailInfo($id, 'odbiorca')."&rept=".$SQL->getMailInfo($id, 'tytul')."'>
Szybka Odpowiedź!</a>";
} else echo "<center><b><font color='red'>Nie jesteś nadawcą!</font></b></center>"; }
if($from == "other") {
if(($SQL->getMailInfo($id, 'odbiorca')) == "$_SESSION[login]"){
echo "<center><b><img src='../../layouts/".$layout."/images/others/blok.bmp'/></br> Otrzymałeś następującą wiadomość od ".$SQL->getMailInfo($id, 'nadawca')."!</br>
<img src='../../layouts/".$layout."/images/others/blok.bmp'/></br>
<u>".$SQL->getMailInfo($id, 'tytul')."</u></br></br>".$SQL->getMailInfo($id, 'tresc')."</br></br>
<img src='../../layouts/".$layout."/images/others/blok.bmp'/></br></br>
<a href='?subtopic=mailbox&action=send&repn=".$SQL->getMailInfo($id, 'nadawca')."&rept=".$SQL->getMailInfo($id, 'tytul')."'>
Szybka Odpowiedź!</a>";
$SQL->query("UPDATE message SET stan = 'odebrana' WHERE mail_id = '$id'");
} else echo "<center><b><font color='red'>Nie jesteś odbiorcą!</font></b></center>"; }
} else echo "<center><b><font color='red'>Wybierz wiadomość do przeczytania!</font></b></center>"; }
function getMailInfo($id, $what)
{
require('hahicz.php');
return $info[$what];
}
Nie sądziłem że kod jest wam potrzebny.
Pozdrawiam