Update of the mail and dns module.
43 files modified
3 files renamed
7 files added
| | |
| | | break;
|
| | |
|
| | | case 'CHECKBOX':
|
| | | $checked = (empty($val))?'':' CHECKED';
|
| | | $new_record[$key] = "<input name=\"".$key."\" type=\"checkbox\" value=\"".$field['value']."\" $checked>\r\n";
|
| | | $checked = ($val == $field['value'][1])?' CHECKED':''; |
| | | $new_record[$key] = "<input name=\"".$key."\" type=\"checkbox\" value=\"".$field['value'][1]."\" $checked>\r\n"; |
| | | break;
|
| | |
|
| | | case 'CHECKBOXARRAY':
|
| | |
| | | break;
|
| | |
|
| | | case 'CHECKBOX':
|
| | | $checked = (empty($field["default"]))?'':' CHECKED';
|
| | | $new_record[$key] = "<input name=\"".$key."\" type=\"checkbox\" value=\"".$field['value']."\" $checked>\r\n";
|
| | | // $checked = (empty($field["default"]))?'':' CHECKED'; |
| | | $checked = ($field["default"] == $field['value'][1])?' CHECKED':''; |
| | | $new_record[$key] = "<input name=\"".$key."\" type=\"checkbox\" value=\"".$field['value'][1]."\" $checked>\r\n"; |
| | | break;
|
| | |
|
| | | case 'CHECKBOXARRAY':
|
| | |
| | | } else {
|
| | | $sql_insert_val .= "md5('".$record[$key]."'), ";
|
| | | }
|
| | | } elseif ($field['formtype'] == 'CHECKBOX') { |
| | | $sql_insert_key .= "`$key`, "; |
| | | if($record[$key] == '') { |
| | | $sql_insert_val .= "'".$field['value'][0]."', "; |
| | | } else { |
| | | $sql_insert_val .= "'".$record[$key]."', "; |
| | | } |
| | | } else {
|
| | | $sql_insert_key .= "`$key`, ";
|
| | | $sql_insert_val .= "'".$record[$key]."', ";
|
| | |
| | | $sql_update .= "`$key` = '".crypt($record[$key])."', ";
|
| | | } else {
|
| | | $sql_update .= "`$key` = md5('".$record[$key]."'), ";
|
| | | } |
| | | } elseif ($field['formtype'] == 'CHECKBOX') { |
| | | if($record[$key] == '') { |
| | | $sql_update .= "`$key` = '".$field['value'][0]."', "; |
| | | } else { |
| | | $sql_update .= "`$key` = '".$record[$key]."', "; |
| | | }
|
| | | } else {
|
| | | $sql_update .= "`$key` = '".$record[$key]."', ";
|
| | |
| | |
|
| | | // Daten in History tabelle speichern
|
| | | if($this->errorMessage == '' and $this->formDef['db_history'] == 'yes') $this->datalogSave($action,$primary_id,$record);
|
| | | // die($sql);
|
| | | return $sql;
|
| | | }
|
| | |
|
| | |
| | | $form["description"] = "";
|
| | | $form["name"] = "rr";
|
| | | $form["action"] = "rr_edit.php";
|
| | | $form["db_table"] = "rr";
|
| | | $form["db_table"] = "dns_rr"; |
| | | $form["db_table_idx"] = "id";
|
| | | $form["db_history"] = "yes";
|
| | | $form["tab_default"] = "rr";
|
| | |
| | | $form["description"] = "";
|
| | | $form["name"] = "soa";
|
| | | $form["action"] = "soa_edit.php";
|
| | | $form["db_table"] = "soa";
|
| | | $form["db_table"] = "dns_soa"; |
| | | $form["db_table_idx"] = "id";
|
| | | $form["db_history"] = "yes";
|
| | | $form["tab_default"] = "soa";
|
| | |
| | | $liste["name"] = "rr";
|
| | |
|
| | | // Database table
|
| | | $liste["table"] = "rr";
|
| | | $liste["table"] = "dns_rr"; |
| | |
|
| | | // Index index field of the database table
|
| | | $liste["table_idx"] = "id";
|
| | |
| | | $liste["name"] = "soa";
|
| | |
|
| | | // Database table
|
| | | $liste["table"] = "soa";
|
| | | $liste["table"] = "dns_soa"; |
| | |
|
| | | // Index index field of the database table
|
| | | $liste["table_idx"] = "id";
|
| | |
| | | global $app, $conf;
|
| | |
|
| | | $app->uses('tform');
|
| | | if(!$rr = $app->db->queryOneRecord("SELECT * FROM rr WHERE id = ".$_REQUEST['id']." AND ".$app->tform->getAuthSQL('d'))) $app->error($app->lng('error_no_permission'));
|
| | | if(!$rr = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE id = ".$_REQUEST['id']." AND ".$app->tform->getAuthSQL('d'))) $app->error($app->lng('error_no_permission')); |
| | |
|
| | | //$rr = $app->db->queryOneRecord("SELECT * FROM rr WHERE id = ".$_REQUEST['id']);
|
| | | $zone_id = $rr['zone'];
|
| | |
|
| | | // update serial
|
| | | $soa = $app->db->queryOneRecord("SELECT * FROM soa WHERE id = ".$zone_id);
|
| | | $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ".$zone_id); |
| | | $serial = $soa['serial'];
|
| | | $update = 1;
|
| | |
|
| | |
| | | } else {
|
| | | $new_serial = $current_date.'01';
|
| | | }
|
| | | $app->db->query("UPDATE soa SET serial = '".$new_serial."' WHERE id = ".$zone_id);
|
| | | $app->db->query("UPDATE dns_soa SET serial = '".$new_serial."' WHERE id = ".$zone_id); |
| | | }
|
| | |
|
| | | // PTR
|
| | |
| | | } else {
|
| | | $ptr_soa_rr_data = $rr['name'].(trim($rr['name']) == '' ? '' : '.').$soa['origin'];
|
| | | }
|
| | | if($ptr_soa_exist = $app->db->queryOneRecord("SELECT * FROM soa WHERE origin = '".$ptr_soa."'")){
|
| | | if($ptr_soa_rr_exist = $app->db->queryOneRecord("SELECT * FROM rr WHERE zone = '".$ptr_soa_exist['id']."' AND name = '".$d."' AND type = 'PTR' AND data = '".$ptr_soa_rr_data."'")){
|
| | | if($ptr_soa_exist = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE origin = '".$ptr_soa."'")){ |
| | | if($ptr_soa_rr_exist = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = '".$ptr_soa_exist['id']."' AND name = '".$d."' AND type = 'PTR' AND data = '".$ptr_soa_rr_data."'")){ |
| | | $app->db->query("DELETE FROM rr WHERE id = ".$ptr_soa_rr_exist['id']);
|
| | | // is there another A/AAAA record with that IP address?
|
| | | if($other_rr = $app->db->queryOneRecord("SELECT * FROM rr WHERE (type = 'A' OR type = 'AAAA') AND data = '".$rr['data']."' AND id != ".$rr['id'])){
|
| | | $other_soa = $app->db->queryOneRecord("SELECT * FROM soa WHERE id = ".$other_rr['zone']);
|
| | | if($other_rr = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE (type = 'A' OR type = 'AAAA') AND data = '".$rr['data']."' AND id != ".$rr['id'])){ |
| | | $other_soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ".$other_rr['zone']); |
| | | if(substr($other_rr['name'], -1) == '.'){
|
| | | $other_ptr_soa_rr_data = $other_rr['name'];
|
| | | } else {
|
| | | $other_ptr_soa_rr_data = $other_rr['name'].(trim($other_rr['name']) == '' ? '' : '.').$other_soa['origin'];
|
| | | }
|
| | | $app->db->query("INSERT INTO rr (zone, name, type, data, aux, ttl, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa_exist['id']."', '".$d."', 'PTR', '".$other_ptr_soa_rr_data."', '0', '".$conf['default_ttl']."', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')");
|
| | | $app->db->query("INSERT INTO dns_rr (zone, name, type, data, aux, ttl, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa_exist['id']."', '".$d."', 'PTR', '".$other_ptr_soa_rr_data."', '0', '".$conf['default_ttl']."', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')"); |
| | | }
|
| | |
|
| | | // if no more records exist for the ptr_soa, delete it
|
| | | if(!$ptr_soa_rr = $app->db->queryOneRecord("SELECT * FROM rr WHERE zone = '".$ptr_soa_exist['id']."'")){
|
| | | $app->db->query("DELETE FROM soa WHERE id = ".$ptr_soa_exist['id']);
|
| | | if(!$ptr_soa_rr = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = '".$ptr_soa_exist['id']."'")){ |
| | | $app->db->query("DELETE FROM dns_soa WHERE id = ".$ptr_soa_exist['id']); |
| | | } else { // increment serial
|
| | | $serial_date = substr($ptr_soa_exist['serial'], 0, 8);
|
| | | $count = intval(substr($ptr_soa_exist['serial'], 8, 2));
|
| | |
| | | } else {
|
| | | $new_serial = $current_date.'01';
|
| | | }
|
| | | $app->db->query("UPDATE soa SET serial = '".$new_serial."' WHERE id = ".$ptr_soa_exist['id']);
|
| | | $app->db->query("UPDATE dns_soa SET serial = '".$new_serial."' WHERE id = ".$ptr_soa_exist['id']); |
| | | }
|
| | | }
|
| | | }
|
| | |
| | | $increased_serials[] = -1;
|
| | | if($app->tform->errorMessage == ''){
|
| | | // update serial
|
| | | $soa = $app->db->queryOneRecord("SELECT * FROM soa WHERE id = ".$this->dataRecord["zone"]);
|
| | | $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ".$this->dataRecord["zone"]); |
| | | $serial = $soa['serial'];
|
| | | $update = 0;
|
| | | if($old_record = $app->db->queryOneRecord("SELECT * FROM rr WHERE id = ".$this->dataRecord["id"])){
|
| | | if($old_record = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE id = ".$this->dataRecord["id"])){ |
| | | foreach($old_record as $key => $val){
|
| | | if($this->dataRecord[$key] != $val && isset($this->dataRecord[$key])) $update += 1;
|
| | | }
|
| | |
| | | if($update > 0 && !in_array($soa['id'], $increased_serials)){
|
| | | $new_serial = $app->validate_dns->increase_serial($serial);
|
| | | $increased_serials[] = $soa['id'];
|
| | | $app->db->query("UPDATE soa SET serial = '".$new_serial."' WHERE id = ".$this->dataRecord["zone"]);
|
| | | $app->db->query("UPDATE dns_soa SET serial = '".$new_serial."' WHERE id = ".$this->dataRecord["zone"]); |
| | | }
|
| | |
|
| | | // PTR
|
| | |
| | | $ptr_soa_rr_data = $this->dataRecord['name'].(trim($this->dataRecord['name']) == '' ? '' : '.').$soa['origin'];
|
| | | }
|
| | |
|
| | | if(!$ptr_soa_exist = $app->db->queryOneRecord("SELECT * FROM soa WHERE origin = '".$ptr_soa."'")){
|
| | | $app->db->query("INSERT INTO soa (origin, ns, mbox, serial, refresh, retry, expire, minimum, ttl, active, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa."', '".trim($conf['default_ns'])."', '".trim($conf['default_mbox'])."', '".date("Ymd").'01'."', '".$conf['default_refresh']."', '".$conf['default_retry']."', '".$conf['default_expire']."', '".$conf['default_minimum_ttl']."', '".$conf['default_ttl']."', 'Y', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')");
|
| | | if(!$ptr_soa_exist = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE origin = '".$ptr_soa."'")){ |
| | | $app->db->query("INSERT INTO dns_soa (origin, ns, mbox, serial, refresh, retry, expire, minimum, ttl, active, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa."', '".trim($conf['default_ns'])."', '".trim($conf['default_mbox'])."', '".date("Ymd").'01'."', '".$conf['default_refresh']."', '".$conf['default_retry']."', '".$conf['default_expire']."', '".$conf['default_minimum_ttl']."', '".$conf['default_ttl']."', 'Y', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')"); |
| | | $ptr_soa_id = $app->db->insertID();
|
| | | $app->db->query("INSERT INTO rr (zone, name, type, data, aux, ttl, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa_id."', '".$d."', 'PTR', '".$ptr_soa_rr_data."', '0', '".$conf['default_ttl']."', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')");
|
| | | $app->db->query("INSERT INTO dns_rr (zone, name, type, data, aux, ttl, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa_id."', '".$d."', 'PTR', '".$ptr_soa_rr_data."', '0', '".$conf['default_ttl']."', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')"); |
| | | } else {
|
| | | if($ptr_soa_exist['active'] != 'Y') $app->db->query("UPDATE soa SET active = 'Y' WHERE id = ".$ptr_soa_exist['id']);
|
| | | if(!$ptr_soa_rr_exist = $app->db->queryOneRecord("SELECT * FROM rr WHERE zone = '".$ptr_soa_exist['id']."' AND name = '".$d."' AND type = 'PTR'")){
|
| | | $app->db->query("INSERT INTO rr (zone, name, type, data, aux, ttl, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa_exist['id']."', '".$d."', 'PTR', '".$ptr_soa_rr_data."', '0', '".$conf['default_ttl']."', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')");
|
| | | if($ptr_soa_exist['active'] != 'Y') $app->db->query("UPDATE dns_soa SET active = 'Y' WHERE id = ".$ptr_soa_exist['id']); |
| | | if(!$ptr_soa_rr_exist = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = '".$ptr_soa_exist['id']."' AND name = '".$d."' AND type = 'PTR'")){ |
| | | $app->db->query("INSERT INTO dns_rr (zone, name, type, data, aux, ttl, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa_exist['id']."', '".$d."', 'PTR', '".$ptr_soa_rr_data."', '0', '".$conf['default_ttl']."', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')"); |
| | | // increase serial of PTR SOA
|
| | | if(!in_array($ptr_soa_exist['id'], $increased_serials)){
|
| | | $ptr_soa_new_serial = $app->validate_dns->increase_serial($ptr_soa_exist['serial']);
|
| | | $increased_serials[] = $ptr_soa_exist['id'];
|
| | | $app->db->query("UPDATE soa SET serial = '".$ptr_soa_new_serial."' WHERE id = ".$ptr_soa_exist['id']);
|
| | | $app->db->query("UPDATE dns_soa SET serial = '".$ptr_soa_new_serial."' WHERE id = ".$ptr_soa_exist['id']); |
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | list($oa, $ob, $oc, $od) = explode('.', $old_record['data']);
|
| | | $old_ptr_soa = $oc.'.'.$ob.'.'.$oa.'.in-addr.arpa.';
|
| | | $old_ptr_soa_exist = $app->db->queryOneRecord("SELECT * FROM soa WHERE origin = '".$old_ptr_soa."'");
|
| | | $old_ptr_soa_exist = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE origin = '".$old_ptr_soa."'"); |
| | | if(substr($old_record['name'], -1) == '.'){
|
| | | $old_ptr_soa_rr_data = $old_record['name'];
|
| | | } else {
|
| | | $old_ptr_soa_rr_data = $old_record['name'].(trim($old_record['name']) == '' ? '' : '.').$soa['origin'];
|
| | | }
|
| | | if(!$app->db->queryOneRecord("SELECT * FROM rr WHERE zone = '".$old_ptr_soa_exist['id']."' AND name = '".$od."' AND type = 'PTR' AND data = '".$old_ptr_soa_rr_data."'")){
|
| | | if(!$app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = '".$old_ptr_soa_exist['id']."' AND name = '".$od."' AND type = 'PTR' AND data = '".$old_ptr_soa_rr_data."'")){ |
| | | parent::onSubmit();
|
| | | return true;
|
| | | }
|
| | |
| | | $a_rr_with_same_ip = $this->dataRecord;
|
| | | $a_rr_with_same_ip['origin'] = $soa['origin'];
|
| | | } else {
|
| | | $a_rr_with_same_ip = $app->db->queryOneRecord("SELECT rr.*, soa.origin FROM rr, soa WHERE rr.type = 'A' AND rr.data = '".$old_record['data']."' AND rr.zone = soa.id AND soa.active = 'Y' AND rr.id != ".$this->dataRecord["id"]);
|
| | | $a_rr_with_same_ip = $app->db->queryOneRecord("SELECT dns_rr.*, dns_soa.origin FROM dns_rr, dns_soa WHERE dns_rr.type = 'A' AND dns_rr.data = '".$old_record['data']."' AND dns_rr.zone = dns_soa.id AND dns_soa.active = 'Y' AND dns_rr.id != ".$this->dataRecord["id"]); |
| | | }
|
| | |
|
| | | if($a_rr_with_same_ip){
|
| | |
| | | } else {
|
| | | $new_ptr_soa_rr_data = $a_rr_with_same_ip['name'].(trim($a_rr_with_same_ip['name']) == '' ? '' : '.').$a_rr_with_same_ip['origin'];
|
| | | }
|
| | | $app->db->query("UPDATE rr SET data = '".$new_ptr_soa_rr_data."' WHERE zone = '".$old_ptr_soa_exist['id']."' AND name = '".$od."' AND type = 'PTR'");
|
| | | $app->db->query("UPDATE dns_rr SET data = '".$new_ptr_soa_rr_data."' WHERE zone = '".$old_ptr_soa_exist['id']."' AND name = '".$od."' AND type = 'PTR'"); |
| | | // increase serial
|
| | | if(!in_array($old_ptr_soa_exist['id'], $increased_serials)){
|
| | | $new_serial = $app->validate_dns->increase_serial($old_ptr_soa_exist['serial']);
|
| | | $increased_serials[] = $old_ptr_soa_exist['id'];
|
| | | $app->db->query("UPDATE soa SET serial = '".$new_serial."' WHERE id = ".$old_ptr_soa_exist['id']);
|
| | | $app->db->query("UPDATE dns_soa SET serial = '".$new_serial."' WHERE id = ".$old_ptr_soa_exist['id']); |
| | | }
|
| | | } else {
|
| | | $app->db->query("DELETE FROM rr WHERE zone = '".$old_ptr_soa_exist['id']."' AND name = '".$od."' AND type = 'PTR'");
|
| | | if(!$app->db->queryOneRecord("SELECT * FROM rr WHERE zone = '".$old_ptr_soa_exist['id']."'")){
|
| | | $app->db->query("DELETE FROM soa WHERE id = ".$old_ptr_soa_exist['id']);
|
| | | $app->db->query("DELETE FROM dns_rr WHERE zone = '".$old_ptr_soa_exist['id']."' AND name = '".$od."' AND type = 'PTR'"); |
| | | if(!$app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = '".$old_ptr_soa_exist['id']."'")){ |
| | | $app->db->query("DELETE FROM dns_soa WHERE id = ".$old_ptr_soa_exist['id']); |
| | | } else {
|
| | | // increase serial
|
| | | if(!in_array($old_ptr_soa_exist['id'], $increased_serials)){
|
| | | $new_serial = $app->validate_dns->increase_serial($old_ptr_soa_exist['serial']);
|
| | | $increased_serials[] = $old_ptr_soa_exist['id'];
|
| | | $app->db->query("UPDATE soa SET serial = '".$new_serial."' WHERE id = ".$old_ptr_soa_exist['id']);
|
| | | $app->db->query("UPDATE dns_soa SET serial = '".$new_serial."' WHERE id = ".$old_ptr_soa_exist['id']); |
| | | }
|
| | | }
|
| | | }
|
| | |
| | | global $app, $conf;
|
| | |
|
| | | $app->uses('tform');
|
| | | if(!$soa = $app->db->queryOneRecord("SELECT * FROM soa WHERE id = ".$_REQUEST['id']." AND ".$app->tform->getAuthSQL('d'))) $app->error($app->tform->wordbook['error_no_permission']);
|
| | | if(!$soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ".$_REQUEST['id']." AND ".$app->tform->getAuthSQL('d'))) $app->error($app->tform->wordbook['error_no_permission']); |
| | |
|
| | | // PTR
|
| | | if($conf['auto_create_ptr'] == 1 && trim($conf['default_ns']) != '' && trim($conf['default_mbox']) != ''){
|
| | | //$soa = $app->db->queryOneRecord("SELECT * FROM soa WHERE id = ".$_REQUEST['id']);
|
| | | $rrs = $app->db->queryAllRecords("SELECT * FROM rr WHERE zone = '".$_REQUEST['id']."' AND (type = 'A' OR type = 'AAAA')");
|
| | | $rrs = $app->db->queryAllRecords("SELECT * FROM dns_rr WHERE zone = '".$_REQUEST['id']."' AND (type = 'A' OR type = 'AAAA')"); |
| | | if(!empty($rrs)){
|
| | | foreach($rrs as $rr){
|
| | | list($a, $b, $c, $d) = explode('.', $rr['data']);
|
| | |
| | | } else {
|
| | | $ptr_soa_rr_data = $rr['name'].(trim($rr['name']) == '' ? '' : '.').$soa['origin'];
|
| | | }
|
| | | if($ptr_soa_exist = $app->db->queryOneRecord("SELECT * FROM soa WHERE origin = '".$ptr_soa."'")){
|
| | | if($ptr_soa_rr_exist = $app->db->queryOneRecord("SELECT * FROM rr WHERE zone = '".$ptr_soa_exist['id']."' AND name = '".$d."' AND type = 'PTR' AND data = '".$ptr_soa_rr_data."'")){
|
| | | $app->db->query("DELETE FROM rr WHERE id = ".$ptr_soa_rr_exist['id']);
|
| | | if($ptr_soa_exist = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE origin = '".$ptr_soa."'")){ |
| | | if($ptr_soa_rr_exist = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = '".$ptr_soa_exist['id']."' AND name = '".$d."' AND type = 'PTR' AND data = '".$ptr_soa_rr_data."'")){ |
| | | $app->db->query("DELETE FROM dns_rr WHERE id = ".$ptr_soa_rr_exist['id']); |
| | | // is there another A/AAAA record with that IP address?
|
| | | if($other_rr = $app->db->queryOneRecord("SELECT * FROM rr WHERE (type = 'A' OR type = 'AAAA') AND data = '".$rr['data']."' AND id != ".$rr['id']." AND zone != ".$rr['zone'])){
|
| | | $other_soa = $app->db->queryOneRecord("SELECT * FROM soa WHERE id = ".$other_rr['zone']);
|
| | | if($other_rr = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE (type = 'A' OR type = 'AAAA') AND data = '".$rr['data']."' AND id != ".$rr['id']." AND zone != ".$rr['zone'])){ |
| | | $other_soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ".$other_rr['zone']); |
| | | if(substr($other_rr['name'], -1) == '.'){
|
| | | $other_ptr_soa_rr_data = $other_rr['name'];
|
| | | } else {
|
| | | $other_ptr_soa_rr_data = $other_rr['name'].(trim($other_rr['name']) == '' ? '' : '.').$other_soa['origin'];
|
| | | }
|
| | | $app->db->query("INSERT INTO rr (zone, name, type, data, aux, ttl, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa_exist['id']."', '".$d."', 'PTR', '".$other_ptr_soa_rr_data."', '0', '".$conf['default_ttl']."', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')");
|
| | | $app->db->query("INSERT INTO dns_rr (zone, name, type, data, aux, ttl, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa_exist['id']."', '".$d."', 'PTR', '".$other_ptr_soa_rr_data."', '0', '".$conf['default_ttl']."', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')"); |
| | | }
|
| | |
|
| | | // if no more records exist for the ptr_soa, delete it
|
| | | if(!$ptr_soa_rr = $app->db->queryOneRecord("SELECT * FROM rr WHERE zone = '".$ptr_soa_exist['id']."'")){
|
| | | $app->db->query("DELETE FROM soa WHERE id = ".$ptr_soa_exist['id']);
|
| | | if(!$ptr_soa_rr = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = '".$ptr_soa_exist['id']."'")){ |
| | | $app->db->query("DELETE FROM dns_soa WHERE id = ".$ptr_soa_exist['id']); |
| | | } else { // increment serial
|
| | | $serial_date = substr($ptr_soa_exist['serial'], 0, 8);
|
| | | $count = intval(substr($ptr_soa_exist['serial'], 8, 2));
|
| | |
| | | } else {
|
| | | $new_serial = $current_date.'01';
|
| | | }
|
| | | $app->db->query("UPDATE soa SET serial = '".$new_serial."' WHERE id = ".$ptr_soa_exist['id']);
|
| | | $app->db->query("UPDATE dns_soa SET serial = '".$new_serial."' WHERE id = ".$ptr_soa_exist['id']); |
| | | }
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | // delete associated records
|
| | | $app->db->query("DELETE FROM rr WHERE zone = ".$_REQUEST['id']);
|
| | | $app->db->query("DELETE FROM dns_rr WHERE zone = ".$_REQUEST['id']); |
| | |
|
| | | parent::onDelete();
|
| | | }
|
| | |
| | |
|
| | | $increased_serials[] = -1;
|
| | | // update serial
|
| | | $soa = $app->db->queryOneRecord("SELECT * FROM soa WHERE id = ".$this->dataRecord["id"]);
|
| | | $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ".$this->dataRecord["id"]); |
| | | $serial = $soa['serial'];
|
| | | $update = 0;
|
| | | if($soa){
|
| | |
| | | // update rr if origin has changed
|
| | | if($soa['origin'] != $this->dataRecord['origin']){
|
| | |
|
| | | if($rrs = $app->db->queryAllRecords("SELECT * FROM rr")){
|
| | | if($rrs = $app->db->queryAllRecords("SELECT * FROM dns_rr")){ |
| | | $update_soas = array();
|
| | | foreach($rrs as $rr){
|
| | | if($soa['origin'] == substr($rr['name'], -(strlen($soa['origin']))) || $soa['origin'] == substr($rr['data'], -(strlen($soa['origin'])))) $update_soas[] = $rr['zone'];
|
| | | //$update_soas[] = $app->db->queryAllRecords("SELECT DISTINCT zone FROM rr WHERE name LIKE '%".$soa['origin']."' OR data LIKE '%".$soa['origin']."'");
|
| | |
|
| | | $app->db->query("UPDATE rr SET name = '".substr($rr['name'], 0, -(strlen($this->dataRecord['origin']))).$this->dataRecord['origin']."' WHERE name LIKE '%".$soa['origin']."' AND type != 'PTR' AND id = ".$rr['id']);
|
| | | $app->db->query("UPDATE dns_rr SET name = '".substr($rr['name'], 0, -(strlen($this->dataRecord['origin']))).$this->dataRecord['origin']."' WHERE name LIKE '%".$soa['origin']."' AND type != 'PTR' AND id = ".$rr['id']); |
| | |
|
| | | $app->db->query("UPDATE rr SET data = '".substr($rr['data'], 0, -(strlen($this->dataRecord['origin']))).$this->dataRecord['origin']."' WHERE data LIKE '%".$soa['origin']."' AND type != 'PTR' AND id = ".$rr['id']);
|
| | | $app->db->query("UPDATE dns_rr SET data = '".substr($rr['data'], 0, -(strlen($this->dataRecord['origin']))).$this->dataRecord['origin']."' WHERE data LIKE '%".$soa['origin']."' AND type != 'PTR' AND id = ".$rr['id']); |
| | |
|
| | | if($conf['auto_create_ptr'] == 1 && trim($conf['default_ns']) != '' && trim($conf['default_mbox']) != ''){
|
| | | $app->db->query("UPDATE rr SET name = '".substr($rr['name'], 0, -(strlen($this->dataRecord['origin']))).$this->dataRecord['origin']."' WHERE name LIKE '%".$soa['origin']."' AND type = 'PTR' AND id = ".$rr['id']);
|
| | | $app->db->query("UPDATE dns_rr SET name = '".substr($rr['name'], 0, -(strlen($this->dataRecord['origin']))).$this->dataRecord['origin']."' WHERE name LIKE '%".$soa['origin']."' AND type = 'PTR' AND id = ".$rr['id']); |
| | |
|
| | | $app->db->query("UPDATE rr SET data = '".substr($rr['data'], 0, -(strlen($this->dataRecord['origin']))).$this->dataRecord['origin']."' WHERE data LIKE '%".$soa['origin']."' AND type = 'PTR' AND id = ".$rr['id']);
|
| | | $app->db->query("UPDATE dns_rr SET data = '".substr($rr['data'], 0, -(strlen($this->dataRecord['origin']))).$this->dataRecord['origin']."' WHERE data LIKE '%".$soa['origin']."' AND type = 'PTR' AND id = ".$rr['id']); |
| | |
|
| | | }
|
| | | }
|
| | |
| | | if(!empty($update_soas)){
|
| | | $update_soas = array_unique($update_soas);
|
| | | foreach($update_soas as $update_soa){
|
| | | $u_soa = $app->db->queryOneRecord("SELECT * FROM soa WHERE id = ".$update_soa);
|
| | | $u_soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ".$update_soa); |
| | | if(!in_array($u_soa['id'], $increased_serials)){
|
| | | $new_serial = $app->validate_dns->increase_serial($u_soa['serial']);
|
| | | if($conf['auto_create_ptr'] == 1 && trim($conf['default_ns']) != '' && trim($conf['default_mbox']) != ''){
|
| | | $app->db->query("UPDATE soa SET serial = '".$new_serial."' WHERE id = ".$update_soa);
|
| | | $app->db->query("UPDATE dns_soa SET serial = '".$new_serial."' WHERE id = ".$update_soa); |
| | | } else {
|
| | | $app->db->query("UPDATE soa SET serial = '".$new_serial."' WHERE id = ".$update_soa." AND origin NOT LIKE '%.in-addr.arpa.'");
|
| | | $app->db->query("UPDATE dns_soa SET serial = '".$new_serial."' WHERE id = ".$update_soa." AND origin NOT LIKE '%.in-addr.arpa.'"); |
| | | }
|
| | | $increased_serials[] = $u_soa['id'];
|
| | | }
|
| | |
| | |
|
| | | if($soa['active'] = 'Y' && $this->dataRecord['active'][0] == 'N'){
|
| | |
|
| | | if($soa_rrs = $app->db->queryAllRecords("SELECT * FROM rr WHERE zone = ".$this->dataRecord['id']." AND type = 'A'")){
|
| | | if($soa_rrs = $app->db->queryAllRecords("SELECT * FROM dns_rr WHERE zone = ".$this->dataRecord['id']." AND type = 'A'")){ |
| | | foreach($soa_rrs as $soa_rr){
|
| | | if(substr($soa_rr['name'], -1) == '.'){
|
| | | $fqdn = $soa_rr['name'];
|
| | |
| | | }
|
| | | list($a, $b, $c, $d) = explode('.', $soa_rr['data']);
|
| | | $ptr_soa = $c.'.'.$b.'.'.$a.'.in-addr.arpa.';
|
| | | if($ptr = $app->db->queryOneRecord("SELECT soa.id, soa.serial FROM soa, rr WHERE rr.type = 'PTR' AND rr.data = '".$fqdn."' AND rr.zone = soa.id AND soa.origin = '".$ptr_soa."'")){
|
| | | if($ptr = $app->db->queryOneRecord("SELECT dns_soa.id, dns_soa.serial FROM dns_soa, dns_rr WHERE dns_rr.type = 'PTR' AND dns_rr.data = '".$fqdn."' AND dns_rr.zone = dns_soa.id AND dns_soa.origin = '".$ptr_soa."'")){ |
| | | ############
|
| | | if($a_rr_with_same_ip = $app->db->queryOneRecord("SELECT rr.*, soa.origin FROM rr, soa WHERE rr.type = 'A' AND rr.data = '".$soa_rr['data']."' AND rr.zone = soa.id AND soa.active = 'Y' AND rr.id != ".$soa_rr["id"]." AND rr.zone != '".$this->dataRecord['zone']."'")){
|
| | | if($a_rr_with_same_ip = $app->db->queryOneRecord("SELECT dns_rr.*, dns_soa.origin FROM dns_rr, dns_soa WHERE dns_rr.type = 'A' AND dns_rr.data = '".$soa_rr['data']."' AND dns_rr.zone = dns_soa.id AND dns_soa.active = 'Y' AND dns_rr.id != ".$soa_rr["id"]." AND dns_rr.zone != '".$this->dataRecord['zone']."'")){ |
| | | if(substr($a_rr_with_same_ip['name'], -1) == '.'){
|
| | | $new_ptr_soa_rr_data = $a_rr_with_same_ip['name'];
|
| | | } else {
|
| | | $new_ptr_soa_rr_data = $a_rr_with_same_ip['name'].(trim($a_rr_with_same_ip['name']) == '' ? '' : '.').$a_rr_with_same_ip['origin'];
|
| | | }
|
| | | $app->db->query("UPDATE rr SET data = '".$new_ptr_soa_rr_data."' WHERE zone = '".$ptr['id']."' AND name = '".$d."' AND type = 'PTR'");
|
| | | $app->db->query("UPDATE dns_rr SET data = '".$new_ptr_soa_rr_data."' WHERE zone = '".$ptr['id']."' AND name = '".$d."' AND type = 'PTR'"); |
| | | } else {
|
| | | $app->db->query("DELETE FROM rr WHERE zone = '".$ptr['id']."' AND name = '".$d."' AND type = 'PTR'");
|
| | | $app->db->query("DELETE FROM dns_rr WHERE zone = '".$ptr['id']."' AND name = '".$d."' AND type = 'PTR'"); |
| | |
|
| | | if(!$app->db->queryOneRecord("SELECT * FROM rr WHERE zone = '".$ptr['id']."'")){
|
| | | $app->db->query("DELETE FROM soa WHERE id = ".$ptr['id']);
|
| | | if(!$app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = '".$ptr['id']."'")){ |
| | | $app->db->query("DELETE FROM dns_soa WHERE id = ".$ptr['id']); |
| | | } else {
|
| | | // increase serial
|
| | | if(!in_array($ptr['id'], $increased_serials)){
|
| | | $new_serial = $app->validate_dns->increase_serial($ptr['serial']);
|
| | | $app->db->query("UPDATE soa SET serial = '".$new_serial."' WHERE id = ".$ptr['id']);
|
| | | $app->db->query("UPDATE dns_soa SET serial = '".$new_serial."' WHERE id = ".$ptr['id']); |
| | | $increased_serials[] = $ptr['id'];
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | if($soa['active'] = 'N' && $this->dataRecord['active'][0] == 'Y'){
|
| | |
|
| | | if($soa_rrs = $app->db->queryAllRecords("SELECT * FROM rr WHERE zone = ".$this->dataRecord['id']." AND type = 'A'")){
|
| | | if($soa_rrs = $app->db->queryAllRecords("SELECT * FROM dns_rr WHERE zone = ".$this->dataRecord['id']." AND type = 'A'")){ |
| | | foreach($soa_rrs as $soa_rr){
|
| | | #################
|
| | | list($a, $b, $c, $d) = explode('.', $soa_rr['data']);
|
| | |
| | | $ptr_soa_rr_data = $soa_rr['name'].(trim($soa_rr['name']) == '' ? '' : '.').$this->dataRecord['origin'];
|
| | | }
|
| | |
|
| | | if(!$ptr_soa_exist = $app->db->queryOneRecord("SELECT * FROM soa WHERE origin = '".$ptr_soa."'")){
|
| | | $app->db->query("INSERT INTO soa (origin, ns, mbox, serial, refresh, retry, expire, minimum, ttl, active, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa."', '".trim($conf['default_ns'])."', '".trim($conf['default_mbox'])."', '".date("Ymd").'01'."', '".$conf['default_refresh']."', '".$conf['default_retry']."', '".$conf['default_expire']."', '".$conf['default_minimum_ttl']."', '".$conf['default_ttl']."', 'Y', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')");
|
| | | if(!$ptr_soa_exist = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE origin = '".$ptr_soa."'")){ |
| | | $app->db->query("INSERT INTO dns_soa (origin, ns, mbox, serial, refresh, retry, expire, minimum, ttl, active, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa."', '".trim($conf['default_ns'])."', '".trim($conf['default_mbox'])."', '".date("Ymd").'01'."', '".$conf['default_refresh']."', '".$conf['default_retry']."', '".$conf['default_expire']."', '".$conf['default_minimum_ttl']."', '".$conf['default_ttl']."', 'Y', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')"); |
| | | $ptr_soa_id = $app->db->insertID();
|
| | | $app->db->query("INSERT INTO rr (zone, name, type, data, aux, ttl, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa_id."', '".$d."', 'PTR', '".$ptr_soa_rr_data."', '0', '".$conf['default_ttl']."', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')");
|
| | | $app->db->query("INSERT INTO dns_rr (zone, name, type, data, aux, ttl, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa_id."', '".$d."', 'PTR', '".$ptr_soa_rr_data."', '0', '".$conf['default_ttl']."', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')"); |
| | | } else {
|
| | | if($ptr_soa_exist['active'] != 'Y') $app->db->query("UPDATE soa SET active = 'Y' WHERE id = ".$ptr_soa_exist['id']);
|
| | | if(!$ptr_soa_rr_exist = $app->db->queryOneRecord("SELECT * FROM rr WHERE zone = '".$ptr_soa_exist['id']."' AND name = '".$d."' AND type = 'PTR'")){
|
| | | $app->db->query("INSERT INTO rr (zone, name, type, data, aux, ttl, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa_exist['id']."', '".$d."', 'PTR', '".$ptr_soa_rr_data."', '0', '".$conf['default_ttl']."', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')");
|
| | | if($ptr_soa_exist['active'] != 'Y') $app->db->query("UPDATE dns_soa SET active = 'Y' WHERE id = ".$ptr_soa_exist['id']); |
| | | if(!$ptr_soa_rr_exist = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = '".$ptr_soa_exist['id']."' AND name = '".$d."' AND type = 'PTR'")){ |
| | | $app->db->query("INSERT INTO dns_rr (zone, name, type, data, aux, ttl, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa_exist['id']."', '".$d."', 'PTR', '".$ptr_soa_rr_data."', '0', '".$conf['default_ttl']."', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')"); |
| | | // increase serial of PTR SOA
|
| | | if(!in_array($ptr_soa_exist['id'], $increased_serials)){
|
| | | $ptr_soa_new_serial = $app->validate_dns->increase_serial($ptr_soa_exist['serial']);
|
| | | $increased_serials[] = $ptr_soa_exist['id'];
|
| | | $app->db->query("UPDATE soa SET serial = '".$ptr_soa_new_serial."' WHERE id = ".$ptr_soa_exist['id']);
|
| | | $app->db->query("UPDATE dns_soa SET serial = '".$ptr_soa_new_serial."' WHERE id = ".$ptr_soa_exist['id']); |
| | | }
|
| | | }
|
| | | }
|
New file |
| | |
| | | <?php |
| | | |
| | | /* |
| | | Form Definition |
| | | |
| | | Tabledefinition |
| | | |
| | | Datatypes: |
| | | - INTEGER (Forces the input to Int) |
| | | - DOUBLE |
| | | - CURRENCY (Formats the values to currency notation) |
| | | - VARCHAR (no format check, maxlength: 255) |
| | | - TEXT (no format check) |
| | | - DATE (Dateformat, automatic conversion to timestamps) |
| | | |
| | | Formtype: |
| | | - TEXT (Textfield) |
| | | - TEXTAREA (Textarea) |
| | | - PASSWORD (Password textfield, input is not shown when edited) |
| | | - SELECT (Select option field) |
| | | - RADIO |
| | | - CHECKBOX |
| | | - CHECKBOXARRAY |
| | | - FILE |
| | | |
| | | VALUE: |
| | | - Wert oder Array |
| | | |
| | | Hint: |
| | | The ID field of the database table is not part of the datafield definition. |
| | | The ID field must be always auto incement (int or bigint). |
| | | |
| | | |
| | | */ |
| | | |
| | | $form["title"] = "Email Catchall"; |
| | | $form["description"] = ""; |
| | | $form["name"] = "mail_domain_catchall"; |
| | | $form["action"] = "mail_domain_catchall_edit.php"; |
| | | $form["db_table"] = "mail_domain_catchall"; |
| | | $form["db_table_idx"] = "domain_catchall_id"; |
| | | $form["db_history"] = "yes"; |
| | | $form["tab_default"] = "catchall"; |
| | | $form["list_default"] = "mail_domain_catchall_list.php"; |
| | | $form["auth"] = 'yes'; // yes / no |
| | | |
| | | $form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user |
| | | $form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user |
| | | $form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete |
| | | $form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete |
| | | $form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete |
| | | |
| | | $form["tabs"]['catchall'] = array ( |
| | | 'title' => "Domain Catchall", |
| | | 'width' => 150, |
| | | 'template' => "templates/mail_domain_catchall_edit.htm", |
| | | 'fields' => array ( |
| | | ################################## |
| | | # Begin Datatable fields |
| | | ################################## |
| | | 'server_id' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'VARCHAR', |
| | | 'default' => '', |
| | | 'value' => '' |
| | | ), |
| | | 'domain' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'SELECT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'UNIQUE', |
| | | 'errmsg'=> 'domain_error_unique'), |
| | | 1 => array ( 'type' => 'REGEX', |
| | | 'regex' => '/^[\w\.\-]{2,64}\.[a-zA-Z]{2,10}$/', |
| | | 'errmsg'=> 'domain_error_regex'), |
| | | ), |
| | | 'datasource' => array ( 'type' => 'SQL', |
| | | 'querystring' => "SELECT domain FROM mail_domain WHERE type = 'local' AND {AUTHSQL} ORDER BY domain", |
| | | 'keyfield'=> 'domain', |
| | | 'valuefield'=> 'domain' |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'destination' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'active' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'y', |
| | | 'value' => array(0 => 'n',1 => 'y') |
| | | ), |
| | | ################################## |
| | | # ENDE Datatable fields |
| | | ################################## |
| | | ) |
| | | ); |
| | | |
| | | |
| | | ?> |
| | |
| | | 'value' => array('alias' => 'Alias','forward'=>'Forward') |
| | | ), |
| | | 'active' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => '1', |
| | | 'value' => '1' |
| | | 'default' => 'y', |
| | | 'value' => array(0 => 'n',1 => 'y') |
| | | ), |
| | | ################################## |
| | | # ENDE Datatable fields |
| | |
| | | $form["description"] = ""; |
| | | $form["name"] = "mail_blacklist"; |
| | | $form["action"] = "mail_blacklist_edit.php"; |
| | | $form["db_table"] = "mail_blacklist"; |
| | | $form["db_table_idx"] = "blacklist_id"; |
| | | $form["db_table"] = "mail_access"; |
| | | $form["db_table_idx"] = "access_id"; |
| | | $form["db_history"] = "yes"; |
| | | $form["tab_default"] = "blacklist"; |
| | | $form["list_default"] = "mail_blacklist_list.php"; |
| | |
| | | ), |
| | | 'value' => '' |
| | | ), |
| | | 'address' => array ( |
| | | 'source' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'address_error_notempty'), |
| | | 'errmsg'=> 'source_error_notempty'), |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'recipient' => array ( |
| | | 'access' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'default' => 'REJECT', |
| | | 'value' => 'REJECT', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'type' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => 'y', |
| | | 'value' => array('recipient' => 'Recipient', 'sender' => 'Sender', 'client' => 'Client') |
| | | ), |
| | | 'active' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => '1', |
| | | 'value' => '1' |
| | | 'default' => 'y', |
| | | 'value' => array(0 => 'n',1 => 'y') |
| | | ), |
| | | ################################## |
| | | # ENDE Datatable fields |
| | |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'type' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => '', |
| | | 'value' => array('local' => 'local','relay'=>'relay','manual_relay'=>'manual Relay') |
| | | ), |
| | | 'active' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => '1', |
| | | 'value' => '1' |
| | | 'default' => 'y', |
| | | 'value' => array(0 => 'n',1 => 'y') |
| | | ), |
| | | ################################## |
| | | # ENDE Datatable fields |
| | |
| | | $form["description"] = ""; |
| | | $form["name"] = "mail_domain_catchall"; |
| | | $form["action"] = "mail_domain_catchall_edit.php"; |
| | | $form["db_table"] = "mail_domain_catchall"; |
| | | $form["db_table_idx"] = "domain_catchall_id"; |
| | | $form["db_table"] = "mail_forwarding"; |
| | | $form["db_table_idx"] = "forwarding_id"; |
| | | $form["db_history"] = "yes"; |
| | | $form["tab_default"] = "catchall"; |
| | | $form["list_default"] = "mail_domain_catchall_list.php"; |
| | |
| | | $form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete |
| | | |
| | | $form["tabs"]['catchall'] = array ( |
| | | 'title' => "Domain Catchall", |
| | | 'width' => 150, |
| | | 'title' => "Email catchall", |
| | | 'width' => 100, |
| | | 'template' => "templates/mail_domain_catchall_edit.htm", |
| | | 'fields' => array ( |
| | | ################################## |
| | |
| | | ################################## |
| | | 'server_id' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'value' => '' |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'domain' => array ( |
| | | 'source' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'SELECT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'UNIQUE', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'domain_error_empty'), |
| | | 1 => array ( 'type' => 'UNIQUE', |
| | | 'errmsg'=> 'domain_error_unique'), |
| | | 1 => array ( 'type' => 'REGEX', |
| | | 'regex' => '/^[\w\.\-]{2,64}\.[a-zA-Z]{2,10}$/', |
| | | 2 => array ( 'type' => 'REGEX', |
| | | 'regex' => '/^\@[\w\.\-]{2,64}\.[a-zA-Z]{2,10}$/', |
| | | 'errmsg'=> 'domain_error_regex'), |
| | | ), |
| | | 'datasource' => array ( 'type' => 'SQL', |
| | | 'querystring' => "SELECT domain FROM mail_domain WHERE type = 'local' AND {AUTHSQL} ORDER BY domain", |
| | | 'keyfield'=> 'domain', |
| | | 'valuefield'=> 'domain' |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | |
| | | ), |
| | | 'destination' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | 'datasource' => array ( 'type' => 'SQL', |
| | | 'querystring' => 'SELECT email FROM mail_user WHERE {AUTHSQL} ORDER BY email', |
| | | 'keyfield' => 'email', |
| | | 'valuefield' => 'email' |
| | | ), |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISEMAIL', |
| | | 'errmsg'=> 'destination_error_isemail'), |
| | | ), |
| | | 'value' => '' |
| | | ), |
| | | 'type' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => '', |
| | | 'value' => array('alias' => 'Alias','forward'=>'Forward','catchall'=>'Catchall') |
| | | ), |
| | | 'active' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => '1', |
| | | 'value' => '1' |
| | | 'default' => 'y', |
| | | 'value' => array(0 => 'n',1 => 'y') |
| | | ), |
| | | ################################## |
| | | # ENDE Datatable fields |
| | |
| | | ); |
| | | |
| | | |
| | | |
| | | ?> |
| | |
| | | $form["description"] = "";
|
| | | $form["name"] = "mail_forward";
|
| | | $form["action"] = "mail_forward_edit.php";
|
| | | $form["db_table"] = "mail_redirect";
|
| | | $form["db_table_idx"] = "redirect_id";
|
| | | $form["db_table"] = "mail_forwarding"; |
| | | $form["db_table_idx"] = "forwarding_id"; |
| | | $form["db_history"] = "yes";
|
| | | $form["tab_default"] = "forward";
|
| | | $form["list_default"] = "mail_forward_list.php";
|
| | |
| | | 'width' => '30',
|
| | | 'maxlength' => '255'
|
| | | ),
|
| | | 'email' => array (
|
| | | 'source' => array ( |
| | | 'datatype' => 'VARCHAR',
|
| | | 'formtype' => 'TEXT',
|
| | | 'validators' => array ( 0 => array ( 'type' => 'ISEMAIL',
|
| | |
| | | 'value' => array('forward'=>'Forward','alias' => 'Alias')
|
| | | ),
|
| | | 'active' => array (
|
| | | 'datatype' => 'INTEGER',
|
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX',
|
| | | 'default' => '1',
|
| | | 'value' => '1'
|
| | | 'default' => 'y', |
| | | 'value' => array(0 => 'n',1 => 'y') |
| | | ),
|
| | | ##################################
|
| | | # ENDE Datatable fields
|
| | |
| | | 'maxlength' => '10' |
| | | ), |
| | | 'active' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => '1', |
| | | 'value' => '1' |
| | | 'default' => 'y', |
| | | 'value' => array(0 => 'n',1 => 'y') |
| | | ), |
| | | ################################## |
| | | # ENDE Datatable fields |
New file |
| | |
| | | <?php |
| | | |
| | | /* |
| | | Form Definition |
| | | |
| | | Tabledefinition |
| | | |
| | | Datatypes: |
| | | - INTEGER (Forces the input to Int) |
| | | - DOUBLE |
| | | - CURRENCY (Formats the values to currency notation) |
| | | - VARCHAR (no format check, maxlength: 255) |
| | | - TEXT (no format check) |
| | | - DATE (Dateformat, automatic conversion to timestamps) |
| | | |
| | | Formtype: |
| | | - TEXT (Textfield) |
| | | - TEXTAREA (Textarea) |
| | | - PASSWORD (Password textfield, input is not shown when edited) |
| | | - SELECT (Select option field) |
| | | - RADIO |
| | | - CHECKBOX |
| | | - CHECKBOXARRAY |
| | | - FILE |
| | | |
| | | VALUE: |
| | | - Wert oder Array |
| | | |
| | | Hint: |
| | | The ID field of the database table is not part of the datafield definition. |
| | | The ID field must be always auto incement (int or bigint). |
| | | |
| | | |
| | | */ |
| | | |
| | | $form["title"] = "Email Routing"; |
| | | $form["description"] = ""; |
| | | $form["name"] = "mail_transport"; |
| | | $form["action"] = "mail_transport_edit.php"; |
| | | $form["db_table"] = "mail_transport"; |
| | | $form["db_table_idx"] = "transport_id"; |
| | | $form["db_history"] = "yes"; |
| | | $form["tab_default"] = "transport"; |
| | | $form["list_default"] = "mail_transport_list.php"; |
| | | $form["auth"] = 'yes'; // yes / no |
| | | |
| | | $form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user |
| | | $form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user |
| | | $form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete |
| | | $form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete |
| | | $form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete |
| | | |
| | | $form["tabs"]['transport'] = array ( |
| | | 'title' => "Email transport", |
| | | 'width' => 100, |
| | | 'template' => "templates/mail_transport_edit.htm", |
| | | 'fields' => array ( |
| | | ################################## |
| | | # Begin Datatable fields |
| | | ################################## |
| | | 'server_id' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => '', |
| | | 'datasource' => array ( 'type' => 'SQL', |
| | | 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name', |
| | | 'keyfield'=> 'server_id', |
| | | 'valuefield'=> 'server_name' |
| | | ), |
| | | 'value' => '' |
| | | ), |
| | | 'domain' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'UNIQUE', |
| | | 'errmsg'=> 'domain_error_unique'), |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'transport' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'sort_order' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => 5, |
| | | 'value' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10) |
| | | ), |
| | | 'active' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'y', |
| | | 'value' => array(0 => 'n',1 => 'y') |
| | | ), |
| | | ################################## |
| | | # ENDE Datatable fields |
| | | ################################## |
| | | ) |
| | | ); |
| | | |
| | | |
| | | |
| | | ?> |
| | |
| | | 'maxlength' => '10' |
| | | ), |
| | | 'postfix' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => '1', |
| | | 'value' => '1' |
| | | 'default' => 'y', |
| | | 'value' => array(1 => 'y',0 => 'n') |
| | | ), |
| | | 'access' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => '1', |
| | | 'value' => '1' |
| | | 'value' => array(1 => 'y',0 => 'n') |
| | | ), |
| | | ################################## |
| | | # ENDE Datatable fields |
| | |
| | | $form["description"] = ""; |
| | | $form["name"] = "mail_whitelist"; |
| | | $form["action"] = "mail_whitelist_edit.php"; |
| | | $form["db_table"] = "mail_whitelist"; |
| | | $form["db_table_idx"] = "whitelist_id"; |
| | | $form["db_table"] = "mail_access"; |
| | | $form["db_table_idx"] = "access_id"; |
| | | $form["db_history"] = "yes"; |
| | | $form["tab_default"] = "whitelist"; |
| | | $form["list_default"] = "mail_whitelist_list.php"; |
| | |
| | | ), |
| | | 'value' => '' |
| | | ), |
| | | 'address' => array ( |
| | | 'source' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'address_error_notempty'), |
| | | 'errmsg'=> 'source_error_notempty'), |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'recipient' => array ( |
| | | 'access' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'default' => 'OK', |
| | | 'value' => 'OK', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'type' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => 'y', |
| | | 'value' => array('recipient' => 'Recipient', 'sender' => 'Sender', 'client' => 'Client') |
| | | ), |
| | | 'active' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => '1', |
| | | 'value' => '1' |
| | | 'default' => 'y', |
| | | 'value' => array(0 => 'n',1 => 'y') |
| | | ), |
| | | ################################## |
| | | # ENDE Datatable fields |
| | |
| | | <?php |
| | | $wb["server_id_txt"] = 'Server'; |
| | | $wb["address_txt"] = 'Block Address'; |
| | | $wb["source_txt"] = 'Blacklist Address'; |
| | | $wb["recipient_txt"] = 'Recipient'; |
| | | $wb["active_txt"] = 'Active'; |
| | | $wb["btn_save_txt"] = 'Save'; |
| | | $wb["btn_cancel_txt"] = 'Cancel'; |
| | | $wb["address_error_notempty"] = 'Address is empty.'; |
| | | $wb["recipient_txt"] = 'Recipient'; |
| | | $wb["source_error_notempty"] = 'Address is empty.'; |
| | | $wb["type_txt"] = 'Type'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb["list_head_txt"] = 'Email Blacklist'; |
| | | $wb["server_id_txt"] = 'Server'; |
| | | $wb["address_txt"] = 'Blacklisted address'; |
| | | $wb["source_txt"] = 'Blacklisted address'; |
| | | $wb["recipient_txt"] = 'Recipient'; |
| | | $wb["active_txt"] = 'Active'; |
| | | $wb["page_txt"] = 'Page'; |
| | |
| | | $wb["delete_txt"] = 'Delete'; |
| | | $wb["filter_txt"] = 'Filter'; |
| | | $wb["add_new_record_txt"] = 'Add new Blacklist record'; |
| | | $wb["access_txt"] = 'access'; |
| | | $wb["type_txt"] = 'Type'; |
| | | ?> |
New file |
| | |
| | | <?php |
| | | $wb["server_id_txt"] = 'Server'; |
| | | $wb["domain_txt"] = 'Domain'; |
| | | $wb["transport_txt"] = 'Transport'; |
| | | $wb["sort_order_txt"] = 'Sort by'; |
| | | $wb["active_txt"] = 'Active'; |
| | | $wb["btn_save_txt"] = 'Save'; |
| | | $wb["btn_cancel_txt"] = 'Cancel'; |
| | | ?> |
New file |
| | |
| | | <?php |
| | | $wb["list_head_txt"] = 'Advanced Email Routing'; |
| | | $wb["active_txt"] = 'Active'; |
| | | $wb["server_id_txt"] = 'Server'; |
| | | $wb["domain_txt"] = 'Domain'; |
| | | $wb["transport_txt"] = 'Transport'; |
| | | $wb["sort_order_txt"] = 'Sort by'; |
| | | $wb["page_txt"] = 'Page'; |
| | | $wb["page_of_txt"] = 'of'; |
| | | $wb["page_next_txt"] = 'Next'; |
| | | $wb["page_back_txt"] = 'Back'; |
| | | $wb["delete_txt"] = 'Delete'; |
| | | $wb["filter_txt"] = 'Filter'; |
| | | $wb["add_new_record_txt"] = 'Add new transport'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb["server_id_txt"] = 'Server'; |
| | | $wb["address_txt"] = 'Witelist Address'; |
| | | $wb["source_txt"] = 'Witelist Address'; |
| | | $wb["recipient_txt"] = 'Recipient'; |
| | | $wb["active_txt"] = 'Active'; |
| | | $wb["btn_save_txt"] = 'Save'; |
| | | $wb["btn_cancel_txt"] = 'Cancel'; |
| | | $wb["address_error_notempty"] = 'Address is empty.'; |
| | | $wb["source_error_notempty"] = 'Address is empty.'; |
| | | $wb["type_txt"] = 'Type'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb["list_head_txt"] = 'Email Whitelist'; |
| | | $wb["server_id_txt"] = 'Server'; |
| | | $wb["address_txt"] = 'Whitelisted address'; |
| | | $wb["source_txt"] = 'Whitelisted address'; |
| | | $wb["recipient_txt"] = 'Recipient'; |
| | | $wb["active_txt"] = 'Active'; |
| | | $wb["page_txt"] = 'Page'; |
| | |
| | | $wb["delete_txt"] = 'Delete'; |
| | | $wb["filter_txt"] = 'Filter'; |
| | | $wb["add_new_record_txt"] = 'Add new Whitelist record'; |
| | | $wb["access_txt"] = 'access'; |
| | | $wb["type_txt"] = 'Type'; |
| | | ?> |
| | |
| | | array ( |
| | | 'title' => 'Email Routing', |
| | | 'target' => 'content', |
| | | 'link' => '', |
| | | 'link' => 'mail/mail_transport_list.php', |
| | | ), |
| | | ), |
| | | ), |
| | |
| | | ), |
| | | 2 => |
| | | array ( |
| | | 'title' => 'Spamfilter', |
| | | 'title' => 'Users', |
| | | 'target' => 'content', |
| | | 'link' => 'mail/mail_spamfilter_list.php', |
| | | 'link' => 'mail/spamfilter_user_list.php', |
| | | ), |
| | | 3 => |
| | | array ( |
| | | 'title' => 'Policys', |
| | | 'target' => 'content', |
| | | 'link' => 'mail/spamfilter_policy_list.php', |
| | | ), |
| | | ), |
| | | ), |
| | |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => array('1' => "Yes",'0' => "No")); |
| | | 'value' => array('y' => "Yes",'n' => "No")); |
| | | |
| | | $liste["item"][] = array( 'field' => "source", |
| | | 'datatype' => "VARCHAR", |
| | |
| | | $liste["name"] = "mail_blacklist"; |
| | | |
| | | // Database table |
| | | $liste["table"] = "mail_blacklist"; |
| | | $liste["table"] = "mail_access"; |
| | | |
| | | // Index index field of the database table |
| | | $liste["table_idx"] = "blacklist_id"; |
| | | $liste["table_idx"] = "access_id"; |
| | | |
| | | // Search Field Prefix |
| | | $liste["search_prefix"] = "search_"; |
| | |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => array('1' => "Yes",'0' => "No")); |
| | | 'value' => array('y' => "Yes",'n' => "No")); |
| | | |
| | | |
| | | $liste["item"][] = array( 'field' => "server_id", |
| | |
| | | 'width' => "", |
| | | 'value' => ""); |
| | | |
| | | $liste["item"][] = array( 'field' => "address", |
| | | $liste["item"][] = array( 'field' => "source", |
| | | 'datatype' => "VARCHAR", |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | |
| | | 'value' => ""); |
| | | |
| | | |
| | | $liste["item"][] = array( 'field' => "recipient", |
| | | $liste["item"][] = array( 'field' => "type", |
| | | 'datatype' => "VARCHAR", |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | | 'suffix' => "%", |
| | | 'formtype' => "SELECT", |
| | | 'op' => "=", |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => ""); |
| | | 'value' => array('recipient' => 'Recipient', 'sender' => 'Sender', 'client' => 'Client')); |
| | | |
| | | |
| | | ?> |
| | |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => array('1' => "Yes",'0' => "No")); |
| | | 'value' => array('y' => "Yes",'n' => "No")); |
| | | |
| | | |
| | | $liste["item"][] = array( 'field' => "server_id", |
| | |
| | | $liste["name"] = "mail_domain_catchall"; |
| | | |
| | | // Database table |
| | | $liste["table"] = "mail_domain_catchall"; |
| | | $liste["table"] = "mail_forwarding"; |
| | | |
| | | // Index index field of the database table |
| | | $liste["table_idx"] = "domain_catchall_id"; |
| | | $liste["table_idx"] = "forwarding_id"; |
| | | |
| | | // Search Field Prefix |
| | | $liste["search_prefix"] = "search_"; |
| | |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => array('1' => "Yes",'0' => "No")); |
| | | 'value' => array('y' => "Yes",'n' => "No")); |
| | | |
| | | $liste["item"][] = array( 'field' => "server_id", |
| | | 'datatype' => "VARCHAR", |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | | 'suffix' => "%", |
| | | 'width' => "", |
| | | 'value' => ""); |
| | | |
| | | $liste["item"][] = array( 'field' => "domain", |
| | | $liste["item"][] = array( 'field' => "source", |
| | | 'datatype' => "VARCHAR", |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | |
| | | 'suffix' => "%", |
| | | 'width' => "", |
| | | 'value' => ""); |
| | | |
| | | |
| | | ?> |
| | |
| | | $liste["name"] = "mail_forward";
|
| | |
|
| | | // Database table
|
| | | $liste["table"] = "mail_redirect";
|
| | | $liste["table"] = "mail_forwarding"; |
| | |
|
| | | // Index index field of the database table
|
| | | $liste["table_idx"] = "redirect_id";
|
| | | $liste["table_idx"] = "forwarding_id"; |
| | |
|
| | | // Search Field Prefix
|
| | | $liste["search_prefix"] = "search_";
|
| | |
| | | 'prefix' => "",
|
| | | 'suffix' => "",
|
| | | 'width' => "",
|
| | | 'value' => array('1' => "Yes",'0' => "No"));
|
| | | 'value' => array('y' => "Yes",'n' => "No")); |
| | |
|
| | | $liste["item"][] = array( 'field' => "email",
|
| | | $liste["item"][] = array( 'field' => "source", |
| | | 'datatype' => "VARCHAR",
|
| | | 'formtype' => "TEXT",
|
| | | 'op' => "like",
|
| | |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => array('1' => "Yes",'0' => "No")); |
| | | 'value' => array('y' => "Yes",'n' => "No")); |
| | | |
| | | |
| | | $liste["item"][] = array( 'field' => "server_id", |
New file |
| | |
| | | <?php |
| | | |
| | | /* |
| | | Datatypes: |
| | | - INTEGER |
| | | - DOUBLE |
| | | - CURRENCY |
| | | - VARCHAR |
| | | - TEXT |
| | | - DATE |
| | | */ |
| | | |
| | | |
| | | |
| | | // Name of the list |
| | | $liste["name"] = "mail_transport"; |
| | | |
| | | // Database table |
| | | $liste["table"] = "mail_transport"; |
| | | |
| | | // Index index field of the database table |
| | | $liste["table_idx"] = "transport_id"; |
| | | |
| | | // Search Field Prefix |
| | | $liste["search_prefix"] = "search_"; |
| | | |
| | | // Records per page |
| | | $liste["records_per_page"] = 15; |
| | | |
| | | // Script File of the list |
| | | $liste["file"] = "mail_transport_list.php"; |
| | | |
| | | // Script file of the edit form |
| | | $liste["edit_file"] = "mail_transport_edit.php"; |
| | | |
| | | // Script File of the delete script |
| | | $liste["delete_file"] = "mail_transport_del.php"; |
| | | |
| | | // Paging Template |
| | | $liste["paging_tpl"] = "templates/paging.tpl.htm"; |
| | | |
| | | // Enable auth |
| | | $liste["auth"] = "yes"; |
| | | |
| | | |
| | | /***************************************************** |
| | | * Suchfelder |
| | | *****************************************************/ |
| | | |
| | | |
| | | $liste["item"][] = array( 'field' => "active", |
| | | 'datatype' => "VARCHAR", |
| | | 'formtype' => "SELECT", |
| | | 'op' => "=", |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => array('y' => "Yes",'n' => "No")); |
| | | |
| | | |
| | | $liste["item"][] = array( 'field' => "server_id", |
| | | 'datatype' => "VARCHAR", |
| | | 'formtype' => "SELECT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | | 'suffix' => "%", |
| | | 'datasource' => array ( 'type' => 'SQL', |
| | | 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name', |
| | | 'keyfield'=> 'server_id', |
| | | 'valuefield'=> 'server_name' |
| | | ), |
| | | 'width' => "", |
| | | 'value' => ""); |
| | | |
| | | $liste["item"][] = array( 'field' => "domain", |
| | | 'datatype' => "VARCHAR", |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | | 'suffix' => "%", |
| | | 'width' => "", |
| | | 'value' => ""); |
| | | |
| | | |
| | | $liste["item"][] = array( 'field' => "transport", |
| | | 'datatype' => "VARCHAR", |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | | 'suffix' => "%", |
| | | 'width' => "", |
| | | 'value' => ""); |
| | | |
| | | |
| | | $liste["item"][] = array( 'field' => "sort_order", |
| | | 'datatype' => "INTEGER", |
| | | 'formtype' => "TEXT", |
| | | 'op' => "=", |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => ""); |
| | | |
| | | ?> |
| | |
| | | $liste["name"] = "mail_whitelist"; |
| | | |
| | | // Database table |
| | | $liste["table"] = "mail_whitelist"; |
| | | $liste["table"] = "mail_access"; |
| | | |
| | | // Index index field of the database table |
| | | $liste["table_idx"] = "whitelist_id"; |
| | | $liste["table_idx"] = "access_id"; |
| | | |
| | | // Search Field Prefix |
| | | $liste["search_prefix"] = "search_"; |
| | |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => array('1' => "Yes",'0' => "No")); |
| | | 'value' => array('y' => "Yes",'n' => "No")); |
| | | |
| | | |
| | | $liste["item"][] = array( 'field' => "server_id", |
| | |
| | | 'width' => "", |
| | | 'value' => ""); |
| | | |
| | | $liste["item"][] = array( 'field' => "address", |
| | | |
| | | $liste["item"][] = array( 'field' => "source", |
| | | 'datatype' => "VARCHAR", |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | |
| | | 'width' => "", |
| | | 'value' => ""); |
| | | |
| | | $liste["item"][] = array( 'field' => "recipient", |
| | | $liste["item"][] = array( 'field' => "type", |
| | | 'datatype' => "VARCHAR", |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | | 'suffix' => "%", |
| | | 'formtype' => "SELECT", |
| | | 'op' => "=", |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => ""); |
| | | 'value' => array('recipient' => 'Recipient', 'sender' => 'Sender', 'client' => 'Client')); |
| | | |
| | | |
| | | ?> |
| | |
| | | |
| | | class page_action extends tform_actions { |
| | | |
| | | function onShowEnd() { |
| | | global $app, $conf; |
| | | |
| | | // Getting recipient from data record |
| | | $recipient = $this->dataRecord["recipient"]; |
| | | $email_parts = explode("@",$recipient); |
| | | $app->tpl->setVar("recipient_local_part",$email_parts[0]); |
| | | |
| | | // Getting Domains of the user |
| | | $sql = "SELECT domain FROM mail_domain WHERE type = 'local' AND ".$app->tform->getAuthSQL('r'); |
| | | $domains = $app->db->queryAllRecords($sql); |
| | | $domain_select = ''; |
| | | if($_SESSION["s"]["user"]["typ"] == 'admin') $domain_select .= '<option value=""></option>'; |
| | | foreach( $domains as $domain) { |
| | | $selected = ($domain["domain"] == $email_parts[1])?'SELECTED':''; |
| | | $domain_select .= "<option value='$domain[domain]' $selected>$domain[domain]</option>\r\n"; |
| | | } |
| | | $app->tpl->setVar("recipient_domain",$domain_select); |
| | | |
| | | parent::onShowEnd(); |
| | | } |
| | | |
| | | function onSubmit() { |
| | | global $app, $conf; |
| | | |
| | | // Check if Domain belongs to user |
| | | $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = '".$app->db->quote($_POST["recipient_domain"])."' AND ".$app->tform->getAuthSQL('r')); |
| | | if($domain["domain"] != $_POST["recipient_domain"]) $app->tform->errorMessage .= $app->tform->wordbook["no_domain_perm"]; |
| | | |
| | | // compose the email field |
| | | if($_POST["recipient_local_part"] != '') { |
| | | $this->dataRecord["recipient"] = $_POST["recipient_local_part"]."@".$_POST["recipient_domain"]; |
| | | } else { |
| | | $this->dataRecord["recipient"] = $_POST["recipient_domain"]; |
| | | } |
| | | // Set the server id of the mailbox = server ID of mail domain. |
| | | //$this->dataRecord["server_id"] = $domain["server_id"]; |
| | | |
| | | unset($this->dataRecord["recipient_local_part"]); |
| | | unset($this->dataRecord["recipient_domain"]); |
| | | |
| | | parent::onSubmit(); |
| | | } |
| | | |
| | | } |
| | | |
| | | $app->tform_actions = new page_action; |
| | |
| | | }
|
| | |
|
| | | $app->uses('listform_actions');
|
| | | $app->listform_actions->SQLExtWhere = "access = 'REJECT'"; |
| | |
|
| | | $app->listform_actions->onLoad();
|
| | |
|
| | |
| | |
|
| | | class page_action extends tform_actions {
|
| | |
|
| | | function onShowEnd() { |
| | | global $app, $conf; |
| | | |
| | | $email = $this->dataRecord["source"]; |
| | | $email_parts = explode("@",$email); |
| | | $app->tpl->setVar("email_local_part",$email_parts[0]); |
| | | |
| | | // Getting Domains of the user |
| | | $sql = "SELECT domain FROM mail_domain WHERE ".$app->tform->getAuthSQL('r'); |
| | | $domains = $app->db->queryAllRecords($sql); |
| | | $domain_select = ''; |
| | | if(is_array($domains)) { |
| | | foreach( $domains as $domain) { |
| | | $selected = ($domain["domain"] == $email_parts[1])?'SELECTED':''; |
| | | $domain_select .= "<option value='$domain[domain]' $selected>$domain[domain]</option>\r\n"; |
| | | } |
| | | } |
| | | $app->tpl->setVar("email_domain",$domain_select); |
| | | |
| | | parent::onShowEnd(); |
| | | } |
| | | |
| | | function onSubmit() {
|
| | | global $app, $conf;
|
| | |
|
| | | // Check if Domain belongs to user
|
| | | $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = '".$app->db->quote($_POST["domain"])."' AND ".$app->tform->getAuthSQL('r'));
|
| | | if($domain["domain"] != $_POST["domain"]) $app->tform->errorMessage .= $app->tform->wordbook["no_domain_perm"];
|
| | | $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = '".$app->db->quote($_POST["email_domain"])."' AND ".$app->tform->getAuthSQL('r')); |
| | | if($domain["domain"] != $_POST["email_domain"]) $app->tform->errorMessage .= $app->tform->wordbook["no_domain_perm"]; |
| | |
|
| | | // Set the server id of the catchall = server ID of mail domain.
|
| | | // compose the email field |
| | | $this->dataRecord["source"] = "@".$_POST["email_domain"]; |
| | | // Set the server id of the mailbox = server ID of mail domain. |
| | | $this->dataRecord["server_id"] = $domain["server_id"];
|
| | | |
| | | //unset($this->dataRecord["email_local_part"]); |
| | | unset($this->dataRecord["email_domain"]); |
| | |
|
| | | parent::onSubmit();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | $app->tform_actions = new page_action;
|
| | | $app->tform_actions->onLoad();
|
| | |
|
| | | $page = new page_action; |
| | | $page->onLoad(); |
| | |
|
| | | ?> |
| | |
| | |
|
| | | $app->uses('listform_actions');
|
| | |
|
| | | // Limit the results to alias domains |
| | | $app->listform_actions->SQLExtWhere = "type = 'catchall'"; |
| | | |
| | | $app->listform_actions->onLoad();
|
| | |
|
| | |
|
| | |
| | | function onShowEnd() {
|
| | | global $app, $conf;
|
| | |
|
| | | $email = $this->dataRecord["email"];
|
| | | $email = $this->dataRecord["source"]; |
| | | $email_parts = explode("@",$email);
|
| | | $app->tpl->setVar("email_local_part",$email_parts[0]);
|
| | |
|
| | | // Getting Domains of the user
|
| | | $sql = "SELECT domain FROM mail_domain WHERE type = 'local' AND ".$app->tform->getAuthSQL('r');
|
| | | $sql = "SELECT domain FROM mail_domain WHERE ".$app->tform->getAuthSQL('r'); |
| | | $domains = $app->db->queryAllRecords($sql);
|
| | | $domain_select = '';
|
| | | foreach( $domains as $domain) {
|
| | |
| | | if($domain["domain"] != $_POST["email_domain"]) $app->tform->errorMessage .= $app->tform->wordbook["no_domain_perm"];
|
| | |
|
| | | // compose the email field
|
| | | $this->dataRecord["email"] = $_POST["email_local_part"]."@".$_POST["email_domain"];
|
| | | $this->dataRecord["source"] = $_POST["email_local_part"]."@".$_POST["email_domain"]; |
| | | // Set the server id of the mailbox = server ID of mail domain.
|
| | | $this->dataRecord["server_id"] = $domain["server_id"];
|
| | |
|
File was renamed from interface/web/mail/mail_domain_route_del.php |
| | |
| | | * Begin Form configuration
|
| | | ******************************************/
|
| | |
|
| | | $list_def_file = "list/mail_domain_route.list.php";
|
| | | $tform_def_file = "form/mail_domain_route.tform.php";
|
| | | $list_def_file = "list/mail_transport.list.php"; |
| | | $tform_def_file = "form/mail_transport.tform.php"; |
| | |
|
| | | /******************************************
|
| | | * End Form configuration
|
File was renamed from interface/web/mail/mail_domain_route_edit.php |
| | |
| | | * Begin Form configuration
|
| | | ******************************************/
|
| | |
|
| | | $tform_def_file = "form/mail_domain_route.tform.php";
|
| | | $tform_def_file = "form/mail_transport.tform.php"; |
| | |
|
| | | /******************************************
|
| | | * End Form configuration
|
File was renamed from interface/web/mail/mail_domain_route_list.php |
| | |
| | | * Begin Form configuration
|
| | | ******************************************/
|
| | |
|
| | | $list_def_file = "list/mail_domain_route.list.php";
|
| | | $list_def_file = "list/mail_transport.list.php"; |
| | |
|
| | | /******************************************
|
| | | * End Form configuration
|
| | |
| | | $app->uses('listform_actions');
|
| | |
|
| | | // Limit the results to alias domains
|
| | | $app->listform_actions->SQLExtWhere = "";
|
| | | // $app->listform_actions->SQLExtWhere = "type = 'local'"; |
| | |
|
| | | // Generate the page
|
| | | $app->listform_actions->onLoad();
|
| | |
|
| | |
|
| | |
| | | |
| | | class page_action extends tform_actions { |
| | | |
| | | function onShowEnd() { |
| | | global $app, $conf; |
| | | |
| | | // Getting recipient from data record |
| | | $recipient = $this->dataRecord["recipient"]; |
| | | $email_parts = explode("@",$recipient); |
| | | $app->tpl->setVar("recipient_local_part",$email_parts[0]); |
| | | |
| | | // Getting Domains of the user |
| | | $sql = "SELECT domain FROM mail_domain WHERE type = 'local' AND ".$app->tform->getAuthSQL('r'); |
| | | $domains = $app->db->queryAllRecords($sql); |
| | | $domain_select = ''; |
| | | if($_SESSION["s"]["user"]["typ"] == 'admin') $domain_select .= '<option value=""></option>'; |
| | | foreach( $domains as $domain) { |
| | | $selected = ($domain["domain"] == $email_parts[1])?'SELECTED':''; |
| | | $domain_select .= "<option value='$domain[domain]' $selected>$domain[domain]</option>\r\n"; |
| | | } |
| | | $app->tpl->setVar("recipient_domain",$domain_select); |
| | | |
| | | parent::onShowEnd(); |
| | | } |
| | | |
| | | function onSubmit() { |
| | | global $app, $conf; |
| | | |
| | | // Check if Domain belongs to user |
| | | $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = '".$app->db->quote($_POST["recipient_domain"])."' AND ".$app->tform->getAuthSQL('r')); |
| | | if($domain["domain"] != $_POST["recipient_domain"]) $app->tform->errorMessage .= $app->tform->wordbook["no_domain_perm"]; |
| | | |
| | | // compose the email field |
| | | if($_POST["recipient_local_part"] != '') { |
| | | $this->dataRecord["recipient"] = $_POST["recipient_local_part"]."@".$_POST["recipient_domain"]; |
| | | } else { |
| | | $this->dataRecord["recipient"] = $_POST["recipient_domain"]; |
| | | } |
| | | // Set the server id of the mailbox = server ID of mail domain. |
| | | // $this->dataRecord["server_id"] = $domain["server_id"]; |
| | | |
| | | unset($this->dataRecord["recipient_local_part"]); |
| | | unset($this->dataRecord["recipient_domain"]); |
| | | |
| | | parent::onSubmit(); |
| | | } |
| | | |
| | | } |
| | | |
| | | $app->tform_actions = new page_action; |
| | |
| | | }
|
| | |
|
| | | $app->uses('listform_actions');
|
| | | $app->listform_actions->SQLExtWhere = "access = 'OK'"; |
| | |
|
| | | $app->listform_actions->onLoad();
|
| | |
|
| | |
| | | <table width="500" border="0" cellspacing="0" cellpadding="2"> |
| | | <tr> |
| | | <td width="126" class="frmText11">{tmpl_var name='server_id_txt'}:</td> |
| | | <td width="366" class="frmText11"> |
| | | <td class="frmText11">{tmpl_var name='server_id_txt'}:</td> |
| | | <td class="frmText11"> |
| | | <select name="server_id" class="text"> |
| | | {tmpl_var name='server_id'} |
| | | </select> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td width="126" class="frmText11">{tmpl_var name='address_txt'}:</td> |
| | | <td width="366" class="frmText11"><input name="address" type="text" class="text" value="{tmpl_var name='address'}" size="30" maxlength="255"></td> |
| | | <td class="frmText11">{tmpl_var name='source_txt'}:</td> |
| | | <td class="frmText11"><input name="source" type="text" class="text" value="{tmpl_var name='source'}" size="30" maxlength="255"></td> |
| | | </tr> |
| | | <tr> |
| | | <td width="126" class="frmText11">{tmpl_var name='recipient_txt'}:</td> |
| | | <td width="366" class="frmText11"><input name="recipient_local_part" type="text" class="text" value="{tmpl_var name='recipient_local_part'}" size="10" maxlength="50"> @ <select name="recipient_domain">{tmpl_var name="recipient_domain"}</select></td> |
| | | <td class="frmText11">{tmpl_var name='type_txt'}:</td> |
| | | <td class="frmText11"> |
| | | <select name="type" class="text"> |
| | | {tmpl_var name='type'} |
| | | </select> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td width="126" class="frmText11">{tmpl_var name='active_txt'}:</td> |
| | | <td width="366" class="frmText11">{tmpl_var name='active'}</td> |
| | | <td class="frmText11">{tmpl_var name='active_txt'}:</td> |
| | | <td class="frmText11">{tmpl_var name='active'}</td> |
| | | </tr> <tr> |
| | | <td class="frmText11"> </td> |
| | | <td class="frmText11"> </td> |
| | |
| | | </tr> |
| | | </table> |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | <input name="access" type="hidden" value="{tmpl_var name='access'}"> |
| | |
| | | <tr> |
| | | <td class="tblHead"><tmpl_var name="active_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="server_id_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="address_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="recipient_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="source_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="type_txt"></td> |
| | | <td class="tblHead"> </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="frmText11"><select name="search_active" onChange="document.myform.submit();">{tmpl_var name='search_active'}</select></td> |
| | | <td class="frmText11"><select name="search_server_id" onChange="document.myform.submit();">{tmpl_var name='search_server_id'}</select></td> |
| | | <td class="frmText11"><input type="text" name="search_address" value="{tmpl_var name='search_address'}" class="text" /></td> |
| | | <td class="frmText11"><input type="text" name="search_recipient" value="{tmpl_var name='search_recipient'}" class="text" /></td> |
| | | <td class="frmText11"><input type="text" name="search_source" value="{tmpl_var name='search_source'}" class="text" /></td> |
| | | <td class="frmText11"><select name="search_type" onChange="document.myform.submit();">{tmpl_var name='search_type'}</select></td> |
| | | <td class="frmText11" align="right"><input name="Filter" type="submit" id="Filter" value="{tmpl_var name="filter_txt"}"></td> |
| | | </tr> |
| | | <tmpl_loop name="records"> |
| | | <tr bgcolor="{tmpl_var name="bgcolor"}"> |
| | | <td class="frmText11"><a href="mail_blacklist_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="active"}</a></td> |
| | | <td class="frmText11"><a href="mail_blacklist_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="server_id"}</a></td> |
| | | <td class="frmText11"><a href="mail_blacklist_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="address"}</a></td> |
| | | <td class="frmText11"><a href="mail_blacklist_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="recipient"}</a></td> |
| | | <td class="frmText11"><a href="mail_blacklist_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="source"}</a></td> |
| | | <td class="frmText11"><a href="mail_blacklist_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="type"}</a></td> |
| | | <td class="frmText11" align="right">[<a href="javascript: del_record('mail_blacklist_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}');" class="frmText11">{tmpl_var name='delete_txt'}</a>]</td> |
| | | </tr> |
| | | </tmpl_loop> |
| | | |
| | | <tr> |
| | | <td colspan="5" height="40" align="center" class="tblFooter"><tmpl_var name="paging"></td> |
| | | </tr> |
| | |
| | | <table width="500" border="0" cellspacing="0" cellpadding="2">
|
| | | <tr>
|
| | | <td width="126" class="frmText11">{tmpl_var name='domain_txt'}:</td>
|
| | | <td width="366" class="frmText11">* @ |
| | | <select name="domain" class="text">
|
| | | {tmpl_var name='domain'}
|
| | | </select>
|
| | | </td>
|
| | | <td width="366" class="frmText11">@ <select name="email_domain">{tmpl_var name="email_domain"}</select></td> |
| | | </tr>
|
| | | <tr>
|
| | | <td width="126" class="frmText11">{tmpl_var name='destination_txt'}:</td>
|
| | | <td width="366" class="frmText11"><input name="destination" type="text" class="text" value="{tmpl_var name='destination'}" size="30" maxlength="255"></td>
|
| | | <td width="366" class="frmText11"> |
| | | <select name="destination" class="text"> |
| | | {tmpl_var name='destination'} |
| | | </select> |
| | | </td> |
| | | </tr>
|
| | | <tr>
|
| | | <td width="126" class="frmText11">{tmpl_var name='active_txt'}:</td>
|
| | |
| | | <tr>
|
| | | <td> </td>
|
| | | <td><input name="btn_save" type="submit" class="button" value="{tmpl_var name='btn_save_txt'}">
|
| | | <input name="btn_cancel" type="button" class="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="self.location.href='mail_domain_catchall_list.php';">
|
| | | <input name="btn_cancel" type="button" class="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="self.location.href='mail_alias_list.php';"> |
| | | </td>
|
| | | </tr>
|
| | | </table>
|
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | <input type="hidden" name="type" value="catchall"> |
| | |
| | | <table width="100%" border="0" cellspacing="0" cellpadding="4"> |
| | | <tr> |
| | | <td class="tblHead"><tmpl_var name="active_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="server_id_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="domain_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="email_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="destination_txt"></td> |
| | | <td class="tblHead"> </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="frmText11"><select name="search_active" onChange="document.myform.submit();">{tmpl_var name='search_active'}</select></td> |
| | | <td class="frmText11"><input type="text" name="search_server_id" value="{tmpl_var name='search_server_id'}" class="text" /></td> |
| | | <td class="frmText11"><input type="text" name="search_domain" value="{tmpl_var name='search_domain'}" class="text" /></td> |
| | | <td class="frmText11"><input type="text" name="search_source" value="{tmpl_var name='search_source'}" class="text" /></td> |
| | | <td class="frmText11"><input type="text" name="search_destination" value="{tmpl_var name='search_destination'}" class="text" /></td> |
| | | <td class="frmText11" align="right"><input name="Filter" type="submit" id="Filter" value="{tmpl_var name="filter_txt"}"></td> |
| | | </tr> |
| | | <tmpl_loop name="records"> |
| | | <tr bgcolor="{tmpl_var name="bgcolor"}"> |
| | | <td class="frmText11"><a href="mail_domain_catchall_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="active"}</a></td> |
| | | <td class="frmText11"><a href="mail_domain_catchall_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="server_id"}</a></td> |
| | | <td class="frmText11"><a href="mail_domain_catchall_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="domain"}</a></td> |
| | | <td class="frmText11"><a href="mail_domain_catchall_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="source"}</a></td> |
| | | <td class="frmText11"><a href="mail_domain_catchall_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="destination"}</a></td> |
| | | <td class="frmText11" align="right">[<a href="javascript: del_record('mail_domain_catchall_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}');" class="frmText11">{tmpl_var name='delete_txt'}</a>]</td> |
| | | </tr> |
| | | </tmpl_loop> |
| | | |
| | | <tr> |
| | | <td colspan="5" height="40" align="center" class="tblFooter"><tmpl_var name="paging"></td> |
| | | <td colspan="4" height="40" align="center" class="tblFooter"><tmpl_var name="paging"></td> |
| | | </tr> |
| | | </table> |
| | | </form> |
| | |
| | | <table width="100%" border="0" cellspacing="0" cellpadding="4">
|
| | | <tr>
|
| | | <td class="tblHead"><tmpl_var name="active_txt"></td>
|
| | | <td class="tblHead"><tmpl_var name="email_txt"></td>
|
| | | <td class="tblHead"><tmpl_var name="source_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="destination_txt"></td>
|
| | | <td class="tblHead"> </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td class="frmText11"><select name="search_active" onChange="document.myform.submit();">{tmpl_var name='search_active'}</select></td>
|
| | | <td class="frmText11"><input type="text" name="search_email" value="{tmpl_var name='search_email'}" class="text" /></td>
|
| | | <td class="frmText11"><input type="text" name="search_source" value="{tmpl_var name='search_source'}" class="text" /></td> |
| | | <td class="frmText11"><input type="text" name="search_destination" value="{tmpl_var name='search_destination'}" class="text" /></td>
|
| | | <td class="frmText11" align="right"><input name="Filter" type="submit" id="Filter" value="{tmpl_var name="filter_txt"}"></td>
|
| | | </tr>
|
| | | <tmpl_loop name="records">
|
| | | <tr bgcolor="{tmpl_var name="bgcolor"}">
|
| | | <td class="frmText11"><a href="mail_forward_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="active"}</a></td>
|
| | | <td class="frmText11"><a href="mail_forward_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="email"}</a></td>
|
| | | <td class="frmText11"><a href="mail_forward_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="source"}</a></td> |
| | | <td class="frmText11"><a href="mail_forward_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="destination"}</a></td>
|
| | | <td class="frmText11" align="right">[<a href="javascript: del_record('mail_forward_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}');" class="frmText11">{tmpl_var name='delete_txt'}</a>]</td>
|
| | | </tr>
|
New file |
| | |
| | | <table width="500" border="0" cellspacing="0" cellpadding="2">
|
| | | <tr>
|
| | | <td class="frmText11">{tmpl_var name='server_id_txt'}:</td>
|
| | | <td class="frmText11">
|
| | | <select name="server_id" class="text">
|
| | | {tmpl_var name='server_id'}
|
| | | </select>
|
| | | </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td class="frmText11">{tmpl_var name='domain_txt'}:</td>
|
| | | <td class="frmText11"><input name="domain" type="text" class="text" value="{tmpl_var name='domain'}" size="30" maxlength="255"></td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td class="frmText11">{tmpl_var name='transport_txt'}:</td>
|
| | | <td class="frmText11"><input name="transport" type="text" class="text" value="{tmpl_var name='transport'}" size="30" maxlength="255"></td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td class="frmText11">{tmpl_var name='sort_order_txt'}:</td>
|
| | | <td class="frmText11">
|
| | | <select name="sort_order" class="text">
|
| | | {tmpl_var name='sort_order'}
|
| | | </select>
|
| | | </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td class="frmText11">{tmpl_var name='active_txt'}:</td>
|
| | | <td class="frmText11">{tmpl_var name='active'}</td>
|
| | | </tr> <tr>
|
| | | <td class="frmText11"> </td>
|
| | | <td class="frmText11"> </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td> </td>
|
| | | <td><input name="btn_save" type="submit" class="button" value="{tmpl_var name='btn_save_txt'}">
|
| | | <input name="btn_cancel" type="button" class="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="self.location.href='mail_transport_list.php';">
|
| | | </td>
|
| | | </tr>
|
| | | </table>
|
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
New file |
| | |
| | | <form name="myform" action="mail_transport_list.php" method="POST"> |
| | | <div class="frmTextHead"><tmpl_var name="list_head_txt"></div><br /> |
| | | <input type="button" value="{tmpl_var name="add_new_record_txt"}" onClick="location.href='mail_transport_edit.php'" /><br /><br /> |
| | | <table width="100%" border="0" cellspacing="0" cellpadding="4"> |
| | | <tr> |
| | | <td class="tblHead"><tmpl_var name="active_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="server_id_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="domain_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="transport_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="sort_order_txt"></td> |
| | | <td class="tblHead"> </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="frmText11"><select name="search_active" onChange="document.myform.submit();">{tmpl_var name='search_active'}</select></td> |
| | | <td class="frmText11"><select name="search_server_id" onChange="document.myform.submit();">{tmpl_var name='search_server_id'}</select></td> |
| | | <td class="frmText11"><input type="text" name="search_domain" value="{tmpl_var name='search_domain'}" class="text" /></td> |
| | | <td class="frmText11"><input type="text" name="search_transport" value="{tmpl_var name='search_transport'}" class="text" /></td> |
| | | <td class="frmText11"><input type="text" name="search_sort_order" value="{tmpl_var name='search_sort_order'}" class="text" /></td> |
| | | <td class="frmText11" align="right"><input name="Filter" type="submit" id="Filter" value="{tmpl_var name="filter_txt"}"></td> |
| | | </tr> |
| | | <tmpl_loop name="records"> |
| | | <tr bgcolor="{tmpl_var name="bgcolor"}"> |
| | | <td class="frmText11"><a href="mail_transport_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="active"}</a></td> |
| | | <td class="frmText11"><a href="mail_transport_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="server_id"}</a></td> |
| | | <td class="frmText11"><a href="mail_transport_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="domain"}</a></td> |
| | | <td class="frmText11"><a href="mail_transport_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="transport"}</a></td> |
| | | <td class="frmText11"><a href="mail_transport_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="sort_order"}</a></td> |
| | | <td class="frmText11" align="right">[<a href="javascript: del_record('mail_transport_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}');" class="frmText11">{tmpl_var name='delete_txt'}</a>]</td> |
| | | </tr> |
| | | </tmpl_loop> |
| | | |
| | | <tr> |
| | | <td colspan="6" height="40" align="center" class="tblFooter"><tmpl_var name="paging"></td> |
| | | </tr> |
| | | </table> |
| | | </form> |
| | |
| | | <table width="500" border="0" cellspacing="0" cellpadding="2"> |
| | | <tr> |
| | | <td width="126" class="frmText11">{tmpl_var name='server_id_txt'}:</td> |
| | | <td width="366" class="frmText11"> |
| | | <td class="frmText11">{tmpl_var name='server_id_txt'}:</td> |
| | | <td class="frmText11"> |
| | | <select name="server_id" class="text"> |
| | | {tmpl_var name='server_id'} |
| | | </select> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td width="126" class="frmText11">{tmpl_var name='address_txt'}:</td> |
| | | <td width="366" class="frmText11"><input name="address" type="text" class="text" value="{tmpl_var name='address'}" size="30" maxlength="255"></td> |
| | | <td class="frmText11">{tmpl_var name='source_txt'}:</td> |
| | | <td class="frmText11"><input name="source" type="text" class="text" value="{tmpl_var name='source'}" size="30" maxlength="255"></td> |
| | | </tr> |
| | | <tr> |
| | | <td width="126" class="frmText11">{tmpl_var name='recipient_txt'}:</td> |
| | | <td width="366" class="frmText11"><input name="recipient_local_part" type="text" class="text" value="{tmpl_var name='recipient_local_part'}" size="10" maxlength="50"> @ <select name="recipient_domain">{tmpl_var name="recipient_domain"}</select></td> |
| | | <td class="frmText11">{tmpl_var name='type_txt'}:</td> |
| | | <td class="frmText11"> |
| | | <select name="type" class="text"> |
| | | {tmpl_var name='type'} |
| | | </select> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td width="126" class="frmText11">{tmpl_var name='active_txt'}:</td> |
| | | <td width="366" class="frmText11">{tmpl_var name='active'}</td> |
| | | <td class="frmText11">{tmpl_var name='active_txt'}:</td> |
| | | <td class="frmText11">{tmpl_var name='active'}</td> |
| | | </tr> <tr> |
| | | <td class="frmText11"> </td> |
| | | <td class="frmText11"> </td> |
| | |
| | | </tr> |
| | | </table> |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | <input name="access" type="hidden" value="{tmpl_var name='access'}"> |
| | |
| | | <tr> |
| | | <td class="tblHead"><tmpl_var name="active_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="server_id_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="address_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="recipient_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="source_txt"></td> |
| | | <td class="tblHead"><tmpl_var name="type_txt"></td> |
| | | <td class="tblHead"> </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="frmText11"><select name="search_active" onChange="document.myform.submit();">{tmpl_var name='search_active'}</select></td> |
| | | <td class="frmText11"><select name="search_server_id" onChange="document.myform.submit();">{tmpl_var name='search_server_id'}</select></td> |
| | | <td class="frmText11"><input type="text" name="search_address" value="{tmpl_var name='search_address'}" class="text" /></td> |
| | | <td class="frmText11"><input type="text" name="search_recipient" value="{tmpl_var name='search_recipient'}" class="text" /></td> |
| | | <td class="frmText11"><input type="text" name="search_source" value="{tmpl_var name='search_source'}" class="text" /></td> |
| | | <td class="frmText11"><select name="search_type" onChange="document.myform.submit();">{tmpl_var name='search_type'}</select></td> |
| | | <td class="frmText11" align="right"><input name="Filter" type="submit" id="Filter" value="{tmpl_var name="filter_txt"}"></td> |
| | | </tr> |
| | | <tmpl_loop name="records"> |
| | | <tr bgcolor="{tmpl_var name="bgcolor"}"> |
| | | <td class="frmText11"><a href="mail_whitelist_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="active"}</a></td> |
| | | <td class="frmText11"><a href="mail_whitelist_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="server_id"}</a></td> |
| | | <td class="frmText11"><a href="mail_whitelist_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="address"}</a></td> |
| | | <td class="frmText11"><a href="mail_whitelist_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="recipient"}</a></td> |
| | | <td class="frmText11"><a href="mail_whitelist_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="source"}</a></td> |
| | | <td class="frmText11"><a href="mail_whitelist_edit.php?id={tmpl_var name='id'}" class="frmText11">{tmpl_var name="type"}</a></td> |
| | | <td class="frmText11" align="right">[<a href="javascript: del_record('mail_whitelist_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}');" class="frmText11">{tmpl_var name='delete_txt'}</a>]</td> |
| | | </tr> |
| | | </tmpl_loop> |
| | | |
| | | <tr> |
| | | <td colspan="5" height="40" align="center" class="tblFooter"><tmpl_var name="paging"></td> |
| | | </tr> |