19 include_once (
'Class.DbObj.php');
20 include_once (
'Class.QueryDb.php');
21 include_once (
'Class.Pop.php');
26 var
$Class =
'$Id: Class.Domain.php,v 1.6 2005/10/05 16:28:42 eric Exp $';
51 iddomain int not null,
52 primary key (iddomain),
59 quotaalert varchar(255),
60 quotatext varchar(255),
61 nobodymsg varchar(255),
62 nobodyalert varchar(255),
63 autoreplaymsg varchar(255)
65 create index domain_idx on domain(iddomain);
66 create sequence seq_iddomain start 10;
71 if ($this->exists($this->name))
return "Domain already exists";
72 if ($this->iddomain ==
"") {
75 $this->iddomain = $arr[
"nextval"];
77 $this->name = strtolower($this->name);
79 $this->log->info(
"Adding domain {$this->name} / {$this->iddomain}");
84 if ($this->status != 2) $this->log->info(
"Modifying domain {$this->name} / {$this->iddomain}");
85 $this->name = strtolower($this->name);
93 $query->basic_elem->sup_where = array(
97 $this->qlist =
$query->Query();
98 $this->qcount =
$query->nb;
104 $p =
new Pop($this->dbaccess);
105 $pm = $p->GetMaster($this->iddomain);
112 $this->log->info(
"Deleting domain {$this->name} / {$this->iddomain}");
118 if (
$name == NULL)
return FALSE;
120 $query->basic_elem->sup_where[] =
"name = '$name'";
126 $this->log->warning(
"No such domain {$query->string}");
133 $this->iddomain =
"0";
134 $this->name =
"externe";
138 $this->name =
"local";
150 $this->gentime = $time;
157 $query->basic_elem->sup_where = array(