<?

class sendmail extends db_object {

var $table_name = "sendmail";

    function getMessagesList($start) {
        $res = array();
        $res["count"] = $this->find("count");
        if($res["count"] > 0) {
            $res["data"] = $this->findAll("*", null, $start, "sendtime DESC");
            for($i=0; $i<count($res["data"]); $i++) {
                // format time
                $res["data"][$i]["sendtime"] = date("H:i:s, F j, Y", $res["data"][$i]["sendtime"]);
            }
        }
        return $res;
    }

}
?>