19 include_once (
'Class.DbObj.php');
20 include_once (
'Class.Domain.php');
21 include_once (
'Class.MailAlias.php');
25 var
$Class =
'$Id: Class.MailAccount.php,v 1.6 2006/01/27 07:49:38 eric Exp $';
51 create table mailaccount(
52 iddomain int not null,
67 create index mailaccount_idx on mailaccount(iduser);
72 if (!isset($v) || $v ==
"") $v =
$d;
77 if (!isset($this->pop) || $this->pop ==
"" || $this->pop == 0) {
78 $this->log->Debug(
"PreInsert for dom={$this->iddomain} iduser={$this->iduser}");
79 $dom =
new Domain($this->dbaccess, $this->iddomain);
80 $this->pop = $dom->MasterPopId($this->dbaccess);
82 $this->
setdef($this->quota,
'0');
83 $this->
setdef($this->vacst,
'0');
84 $this->
setdef($this->vacmsg,
"");
85 $this->
setdef($this->fwdst,
'0');
86 $this->
setdef($this->fwdadd,
"");
87 $this->
setdef($this->keepfwd,
'1');
88 $this->
setdef($this->filterspam,
'0');
89 $this->uptime = time();
96 $this->uptime = time();
101 $q =
new QueryDb($this->dbaccess,
"MailAlias");
102 $q->basic_elem->sup_where = array(
103 "iddomain={$this->iddomain}",
104 "iduser={$this->iduser}"
108 while (list($k, $v) = each($l)) {
110 $a->Set($v->iddomain, $v->iduser);
114 $this->uptime = time();
136 $q =
new QueryDb($this->dbaccess,
"MailAccount");
137 if ($admacc !=
'Y')
$q->basic_elem->sup_where = array(
142 else $q->basic_elem->sup_where = array(
146 $this->qlist =
$q->Query();
147 $this->qcount =
$q->nb;
154 $q =
new QueryDb($this->dbaccess,
"MailAlias");
155 $q->basic_elem->sup_where = array(
156 "iddomain={$this->iddomain}",
157 "iduser={$this->iduser}",
167 $q =
new QueryDb($this->dbaccess,
"MailAccount");
168 $q->basic_elem->sup_where = array(
169 "iddomain={$domain->iddomain}",