32 public $mTable =
'message_outbox';
33 public $mPrimary =
'outbox_id';
34 public $mClass =
'MessageOutboxObject';
38 parent::__construct($db);
41 public function getOutboxCount($uid)
44 return $this->getCount($criteria);
47 public function deleteDays($day)
52 $time = time() - ($day * 86400);
53 $sql =
'DELETE FROM `' . $this->mTable .
'` ';
54 $sql.=
'WHERE `utime` < ' . $time;
55 $this->db->queryF($sql);
58 public function getReceiveUserList($uid = 0, $fuid = 0)
61 $sql =
'SELECT u.`uname`,u.`uid` FROM `' . $this->db->prefix(
'users') .
'` u, ';
62 $sql.=
'`'.$this->mTable .
'` i ';
63 $sql.=
'WHERE i.`to_uid` = u.`uid` ';
64 $sql.=
'AND i.`uid` = ' . $uid .
' ';
65 $sql.=
'GROUP BY u.`uname`, u.`uid`';
67 $result = $this->db->query($sql);
68 while ($row = $this->db->fetchArray($result)) {
69 if ($fuid == $row[
'uid']) {
70 $row[
'select'] =
true;
72 $row[
'select'] =
false;