コード例 #1
0
 public static function init(&$db, &$err, &$typehead)
 {
     $db = new r0mdauDb(_DIR_Database_);
     $err = new Error();
     form($err);
     $typehead['directory'] = directory();
     $typehead['lists'] = lists();
     $typehead['send'] = receiver();
 }
コード例 #2
0
}
# receiver
if ($HTTP_GET_VARS["mailid"]) {
    $mailid = $HTTP_GET_VARS["mailid"];
}
if ($HTTP_POST_VARS["mailid"]) {
    $mailid = $HTTP_POST_VARS["mailid"];
}
if ($mailid) {
    $sql3 = "select m.id, m.subject, m.sender, unix_timestamp( m.ts ) as ts, m.text from fh_mail as m left outer join fh_mail_recv as r on m.id = r.mail where m.id = '{$mailid}' and ( r.receiver = '{$callsign}' or m.sender = '{$callsign}' )";
    $result3 = @mysql_query($sql3) or die(@mysql_error);
    $row3 = @mysql_fetch_array($result3);
    if ($row3["id"]) {
        echo "<pre>Date:    ", gmstrftime('%Y-%m-%d %H:%M:%S', $row3["ts"]), "\n";
        echo "From:    {$row3["sender"]}\nSubject: {$row3["subject"]}\n  \n{$row3["text"]}\n</pre>";
        receiver($row3["id"]);
    } else {
        echo "<h2>this email does not exist or was not sent to '{$callsign}'</h2>";
    }
}
?>
<h1>All Messages to you:</h1>
<table border=1>
<tr><th>date</th><th>subject</th><th>sender</th></tr>
<?php 
$sql4 = "select m.id, m.subject, m.sender, unix_timestamp( m.ts ) as ts from fh_mail as m, fh_mail_recv as r where r.mail = m.id and r.receiver = '{$callsign}' order by ts";
$result4 = @mysql_query($sql4) or die(@mysql_error);
while ($row4 = @mysql_fetch_array($result4)) {
    echo "<tr><td>", gmstrftime('%Y-%m-%d %H:%M:%S', $row4['ts']), "</td>";
    if (!$row4['subject']) {
        $row4['subject'] = '{empty subject}';