Exemplo n.º 1
0
    }
} elseif ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (isset($_POST['action'])) {
        if ($_POST['action'] == "user" && !empty($_POST['mail'])) {
            if ($_POST['id'] > 0) {
                $res = $MailingList->editUser($_POST['id'], $_POST['mail'], $_POST['name']);
            } else {
                $res = $MailingList->addUser($_POST['mail'], $_POST['name']);
            }
            $MailingList->obj = null;
            $funcToCall = "showFormUser";
        } elseif ($_POST['action'] == "group" && !empty($_POST['name'])) {
            if ($_POST['id'] > 0) {
                $res = $MailingList->editList($_POST['id'], $_POST['name'], $_POST['users']);
            } else {
                $res = $MailingList->createList($_POST['name'], $_POST['users']);
            }
            $MailingList->obj = null;
            $MailingList->getUsers();
            $funcToCall = "showFormGroup";
        }
        if ($res) {
            $MailingList->msg = "Saglabāts!";
        }
    }
}
?>
<style>
.normal {color:white; font-family:arial; size:12pt; text-decoration: none;}
.normal:hover {color:yellow; font-family:arial; size:12pt; text-decoration: none;}
.head {color:white; size:24pt; font-weight:bold;}