| | |
| | | |
| | | $type = $data["new"]["type"]; |
| | | if($type != '') { |
| | | $sql = "SELECT * FROM mail_content_filter WHERE server_id = ".intval($conf["server_id"])." AND type = '".$app->db->quote($type)."' AND active = 'y'"; |
| | | $rules = $app->db->queryAllRecords($sql); |
| | | $sql = "SELECT * FROM mail_content_filter WHERE server_id = ? AND type = ?' AND active = 'y'"; |
| | | $rules = $app->db->queryAllRecords($sql, $conf["server_id"], $type); |
| | | $content = ''; |
| | | foreach($rules as $rule) { |
| | | $content .= $rule["pattern"]; |
| | |
| | | |
| | | $type = $data["old"]["type"]; |
| | | if($type != '') { |
| | | $sql = "SELECT * FROM mail_content_filter WHERE server_id = ".intval($conf["server_id"])." AND type = '".$app->db->quote($type)."' AND active = 'y'"; |
| | | $rules = $app->db->queryAllRecords($sql); |
| | | $sql = "SELECT * FROM mail_content_filter WHERE server_id = ? AND type = ? AND active = 'y'"; |
| | | $rules = $app->db->queryAllRecords($sql, $conf["server_id"], $type); |
| | | $content = ''; |
| | | foreach($rules as $rule) { |
| | | $content .= $rule["pattern"]; |