Making more of the new closes stuff use PDO. Also updating the closes
view and adding some templates to patch-emailtemplate.sql.