示例#1
0
<?php

$settings = parse_ini_file('settings.php');
require_once 'lib/functions.php';
$pm = new PubMail($settings);
if (!empty($_POST['email'])) {
    $pm->add_subscribers($_POST['email']);
    require_once 'html/subscribe_added.php';
} else {
    require_once 'html/header.php';
    require_once 'html/subscribe_form.php';
    require_once 'html/footer.php';
}
示例#2
0
<?php

$settings = parse_ini_file('settings.php');
require_once 'lib/functions.php';
$pm = new PubMail($settings);
if (isset($_GET['email'])) {
    $_POST['email'] = $_GET['email'];
}
if (!empty($_POST['email'])) {
    $pm->add_subscribers($_POST['email'], true);
    require_once 'html/subscribe_added.php';
} else {
    require_once 'html/subscribe_form.php';
}
示例#3
0
<?php

chdir('..');
$settings = parse_ini_file('settings.php');
require_once 'lib/functions.php';
$pm = new PubMail($settings);
if (!$pm->authenticate()) {
    require_once 'html/admin_login.php';
    exit;
}
if (!empty($_POST['import'])) {
    // import subscribers
    if ($_POST['send_welcome'] == 'yes') {
        $count = $pm->add_subscribers($_POST['import'], true);
    } else {
        $count = $pm->add_subscribers($_POST['import']);
    }
    require_once 'html/admin_imported.php';
} else {
    // show form
    require_once 'html/admin_import_form.php';
}