示例#1
0
if (isset($_POST['btnNewsletter'])) {
    if ($_POST['frmNewsletterID'] != '') {
        $bolResult = $objNewsletter->editNewsletter($_POST);
        if ($bolResult) {
            $objCore->standardRedirect($_SESSION['sessNewsletterRedirectURL']);
        } else {
            $objCore->standardRedirect('newsletter_frm_uil.php?NewsletterID=' . $_POST['frmNewsletterID']);
        }
    } else {
        $bolResult = $objNewsletter->addNewsletter($_POST);
        if ($bolResult) {
            $objCore->setSuccessMsg(ADMIN_NEWSLETTER_ADD_MSG);
            $objCore->standardRedirect($_SESSION['sessNewsletterRedirectURL']);
        } else {
            $objCore->setErrorMsg(ADMIN_NEWSLETTER_ADD_ERROR);
            $objCore->standardRedirect('newsletter_frm_uil.php');
        }
    }
}
// NEWSLETTER ACTION ( DELETE ).
if (isset($_POST['frmNewsletterList'])) {
    if ($objNewsletter->updateNewsletterList($_POST)) {
        $objCore->standardRedirect($_SESSION['sessNewsletterRedirectURL']);
    }
}
// NEWSLETTER SEND TO MEMBERS.
if (isset($_POST['frmNewsletterSend'])) {
    if ($objNewsletter->sendNewsletter($_POST)) {
        $objCore->standardRedirect($_SESSION['sessNewsletterRedirectURL']);
    }
}