| | |
| | | // get part size |
| | | if (!empty($part[6]) && $part[6]!='NIL') |
| | | $struct->size = intval($part[6]); |
| | | |
| | | |
| | | // read part disposition |
| | | $di = count($part) - 3; |
| | | $di = count($part) - 2; |
| | | if (is_array($part[$di])) |
| | | { |
| | | $struct->disposition = strtolower($part[$di][0]); |
| | |
| | | function get_quota() |
| | | { |
| | | if ($this->get_capability('QUOTA')) |
| | | { |
| | | $result = iil_C_GetQuota($this->conn); |
| | | if ($result["total"]) |
| | | return sprintf("%.2fMB / %.2fMB (%.0f%%)", $result["used"] / 1000.0, $result["total"] / 1000.0, $result["percent"]); |
| | | } |
| | | |
| | | return array('total' => 2048 * 1024, 'used' => 500 * 1024, 'percent' => 32); //iil_C_GetQuota($this->conn); |
| | | |
| | | return FALSE; |
| | | } |
| | | |
| | |
| | | { |
| | | $this->db->query( |
| | | "UPDATE ".get_table_name('cache')." |
| | | SET created=now(), |
| | | SET created=".$this->db->now().", |
| | | data=? |
| | | WHERE user_id=? |
| | | AND cache_key=?", |
| | |
| | | $this->db->query( |
| | | "INSERT INTO ".get_table_name('cache')." |
| | | (created, user_id, cache_key, data) |
| | | VALUES (now(), ?, ?, ?)", |
| | | VALUES (".$this->db->now().", ?, ?, ?)", |
| | | $_SESSION['user_id'], |
| | | $key, |
| | | $data); |
| | |
| | | $this->db->query( |
| | | "INSERT INTO ".get_table_name('messages')." |
| | | (user_id, del, cache_key, created, idx, uid, subject, ".$this->db->quoteIdentifier('from').", ".$this->db->quoteIdentifier('to').", cc, date, size, headers, structure) |
| | | VALUES (?, 0, ?, now(), ?, ?, ?, ?, ?, ?, ".$this->db->fromunixtime($headers->timestamp).", ?, ?, ?)", |
| | | VALUES (?, 0, ?, ".$this->db->now().", ?, ?, ?, ?, ?, ?, ".$this->db->fromunixtime($headers->timestamp).", ?, ?, ?)", |
| | | $_SESSION['user_id'], |
| | | $key, |
| | | $index, |