$(document).ready(function() { $(\"#pms\").tablesorter(); }); "; $n = 0; foreach($pms as $pm) { $oe = ($n++ % 2 == 0) ? "even" : "odd"; $h_subject = html_escape($pm["subject"]); if(strlen(trim($h_subject)) == 0) $h_subject = "(No subject)"; $h_from = html_escape($pm["from_name"]); $from_url = make_link("user/".url_escape($pm["from_name"])); $pm_url = make_link("pm/read/".$pm["id"]); $del_url = make_link("pm/delete/".$pm["id"]); $h_date = html_escape($pm["sent_date"]); if($pm["is_read"] == "N") $h_subject = "$h_subject"; $html .= ""; } $html .= "
SubjectFromDateAction
$h_subject $h_from$h_date
"; $page->add_block(new Block("Private Messages", $html, "main", 10)); } public function display_composer(Page $page, User $from, User $to, $subject="") { $post_url = make_link("pm/send"); $h_subject = html_escape($subject); $to_id = $to->id; $html = <<
Subject:
EOD; $page->add_block(new Block("Write a PM", $html, "main", 20)); } public function display_message(Page $page, User $from, User $to, $pm) { $this->display_composer($page, $to, $from, "Re: ".$pm["subject"]); $page->set_title("Private Message"); $page->set_heading(html_escape($pm["subject"])); $page->add_block(new NavBlock()); $page->add_block(new Block("Message", format_text($pm["message"]), "main", 10)); } } ?>