function list_add() { $tpl = new templates(); $listname = strtolower($_POST["listname_add"]); $domain = $_POST["domain"]; $adminmail = $_POST["adminmail"]; $urlhost = $_POST["urlhost"]; $emailhost = $_POST["emailhost"]; $ldap = new clladp(); $uid = $ldap->uid_from_email($adminmail); if ($uid == null) { echo $tpl->javascript_parse_text("{mailman_admin_not_exists}", 'mailman.lists.php'); return; } $urlhost = "{$urlhost}.{$domain}"; if ($emailhost == null) { if ($_POST["mangle"] == 0) { echo $tpl->javascript_parse_text("{please_fill_subdomain_correctly}"); return; } } $emailhost = "{$emailhost}.{$domain}"; if ($_POST["mangle"] == 1) { $emailhost = $domain; } else { if ($emailhost == null) { echo $tpl->javascript_parse_text("{unable_to_add_this_domain_conflict}: {$domain}"); return; } } $mailman = new mailmancontrol($listname); $mailman->emailhost = $emailhost; $mailman->urlhost = $urlhost; $mailman->adminmail = $adminmail; $mailman->mangle = $_POST["mangle"]; $mailman->EditMysqlList(); }
function chpassword($content) { $array = unserialize(base64_decode($content)); $email = $array["EMAIL"]; $password = $array["PWD"]; $f = new mailmancontrol(); $f->chpassword($email, $password); }