* * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ if (isset($_SESSION['superadmin']) && isset($_GET['id']) && isset($_GET['did']) && $_SESSION['superadmin'] == '1' || $_SESSION['admin'] == '1' && isset($_GET['id']) && isset($_GET['did']) && $access_domain) { // modify the smtp postfix classes: if (isset($_POST['forwarding_options']) && check_domain_feature($_GET['did'], 'p_check_grey') && $config['recipient_classes_grey']) { if (isset($_POST['check_grey']) && $_POST['check_grey'] == "enable") { $sql = sprintf("UPDATE forwardings SET p_check_grey=1 WHERE id='%d'", $db->escapeSimple($_GET['id'])); } else { $sql = sprintf("UPDATE forwardings SET p_check_grey=0 WHERE id='%d'", $db->escapeSimple($_GET['id'])); } $db->query($sql); } if (isset($_POST['forwarding_options']) && check_domain_feature($_GET['did'], 'p_check_polw') && $config['recipient_classes_polw']) { if (isset($_POST['check_polw']) && $_POST['check_polw'] == "enable") { $sql = sprintf("UPDATE forwardings SET p_check_polw=1 WHERE id='%d'", $db->escapeSimple($_GET['id'])); } else { $sql = sprintf("UPDATE forwardings SET p_check_polw=0 WHERE id='%d'", $db->escapeSimple($_GET['id'])); } $db->query($sql); } //del adresses: if (isset($_POST['del_addr']) && isset($_POST['etos'])) { $sql = sprintf("SELECT eto FROM forwardings WHERE id='%d'", $db->escapeSimple($_GET['id'])); $result =& $db->query($sql); $data = $result->fetchrow(DB_FETCHMODE_ASSOC); $etos = $data['eto']; //print_r ($_POST['etos']); foreach ($_POST['etos'] as $key) {
if ($_GET['f'] == 'spamassassin' && $_GET['f'] == 0) { change_domain_feature($_GET['did'], 'bogofilter', '0'); change_domain_feature($_GET['did'], 'spam_del', '0'); change_domain_feature($_GET['did'], 'sa_wb_listing', '0'); change_domain_feature($_GET['did'], 'sa_learn', '0'); } if ($_GET['f'] == 'bogofilter' && !check_domain_feature($_GET['did'], 'p_spamassassin')) { $smarty->assign('error_msg', 'y'); $smarty->assign('if_error_sa_disabled_enable_bogofilter', 'y'); } elseif ($_GET['f'] == 'spam_del' && !check_domain_feature($_GET['did'], 'p_spamassassin')) { $smarty->assign('error_msg', 'y'); $smarty->assign('if_error_sa_disable_enable_spam_del', 'y'); } elseif ($_GET['f'] == 'sa_wb_listing' && !check_domain_feature($_GET['did'], 'p_spamassassin')) { $smarty->assign('error_msg', 'y'); $smarty->assign('if_error_sa_disable_enable_sa_wb_listing', 'y'); } elseif ($_GET['f'] == 'sa_learn' && !check_domain_feature($_GET['did'], 'p_spamassassin')) { $smarty->assign('error_msg', 'y'); $smarty->assign('if_error_sa_disable_enable_sa_learn', 'y'); } else { if ($_GET['f'] == 'check_polw' && $config['recipient_classes_polw'] == 0) { } elseif ($_GET['f'] == 'check_grey' && $config['recipient_classes_grey'] == 0) { } else { change_domain_feature($_GET['did'], $_GET['f'], $_GET['fstate']); } } } // Domain feature veraendern ENDE $sql = sprintf("SELECT * FROM domains WHERE id='%s' LIMIT 1", $db->escapeSimple($_GET['did'])); $result =& $db->query($sql); $data = $result->fetchrow(DB_FETCHMODE_ASSOC); $smarty->assign('dnsname', $data['dnsname']);
if (isset($_POST['imap']) && $_POST['imap'] == "1" && check_domain_feature($_GET['did'], 'p_imap', $db)) { $imap = "1"; } else { $imap = "0"; } if (isset($_POST['pop3']) && $_POST['pop3'] == "1" && check_domain_feature($_GET['did'], 'p_pop3', $db)) { $pop3 = "1"; } else { $pop3 = "0"; } if (isset($_POST['webmail']) && $_POST['webmail'] == "1" && check_domain_feature($_GET['did'], 'p_webmail', $db)) { $webmail = "1"; } else { $webmail = "0"; } if (isset($_POST['p_spamassassin']) && $_POST['p_spamassassin'] == 1 && check_domain_feature($_GET['did'], 'p_spamassassin', $db)) { $p_spamassassin = 1; } else { $p_spamassassin = 0; } if ($config['cleartext_passwd'] == 1) { $cleartext = $_POST['npassword']; } else { $cleartext = ""; } $sql = sprintf("INSERT INTO users SET email='%s',domainid='%s',passwd='%s', full_name='%s',access='1',enew='1',p_imap='%s', p_pop3='%s',p_webmail='%s',cpasswd='%s',p_spamassassin='%s' ", $db->escapeSimple(trim(strtolower($full_email))), $db->escapeSimple($_GET['did']), $db->escapeSimple($cleartext), $db->escapeSimple(clean_input(trim($_POST['full_name']))), $db->escapeSimple($imap), $db->escapeSimple($pop3), $db->escapeSimple($webmail), $db->escapeSimple(crypt($_POST['npassword'])), $db->escapeSimple($p_spamassassin)); $result =& $db->query($sql); $smarty->assign('if_email_saved', 'y'); $smarty->assign('success_msg', 'y'); $smarty->assign('if_email_saved', 'y'); //activate System-Script
if (isset($_POST['webinterface']) && $_POST['webinterface'] == "enable" && check_domain_feature($_GET['did'], 'p_webinterface')) { $webinterface = 1; } else { $webinterface = 0; } if (isset($_POST['autores_xheader']) && $_POST['autores_xheader'] == "enable" && check_domain_feature($_GET['did'], 'p_autores_xheader')) { $autores_xheader = 1; } else { $autores_xheader = 0; } if (isset($_POST['check_polw']) && $_POST['check_polw'] == "enable" && check_domain_feature($_GET['did'], 'p_check_polw') && $config['recipient_classes_polw']) { $check_polw = 1; } else { $check_polw = 0; } if (isset($_POST['check_grey']) && $_POST['check_grey'] == "enable" && check_domain_feature($_GET['did'], 'p_check_grey') && $config['recipient_classes_grey']) { $check_grey = 1; } else { $check_grey = 0; } if (isset($_POST['forwarding']) && $_POST['forwarding'] == "enable") { $forward_vis = 1; } else { $forward_vis = 0; } if (isset($_POST['npassword']) && !empty($_POST['npassword'])) { if (check_passwd_length($_POST['npassword']) == false) { $smarty->assign('error_msg', 'y'); $smarty->assign('if_error_password_long', 'y'); $smarty->assign('full_name', $_POST['full_name']); $error = true;