#!/usr/bin/php
<?php
    define('CRLF',"\r\n");
    ini_set('include_path',ini_get('include_path') . ":/data/sites/www.landscapeonline.com/includes");

    $requiredClasses[] = 'base/ebulletin_admin_class.php';
    $requiredClasses[] = 'base/ebulletin_history_class.php';
    $requiredClasses[] = 'base/subscriber_class.php';

    require('lol_common.inc');

    $eb = new ebulletin_admin_class();
    $hist = new ebulletin_history_class();
    $sub = new subscriber_class();

    $eb->cleanFetch(43);
    foreach($eb->subscribers as $key => $obj) {
        $sub->fetch($obj['id']);
        print($sub->id . "\t\"" . $sub->first_name . "\"\t\"" . $sub->last_name . "\"\t\"" . strtolower($sub->email) . "\"\r\n" ) ;
        //print_r($obj['id']);
    }
    //print_r($eb->subscribers);
    //$subscribers = unserialize($eb->subscribers);
    //print_r($subscribers);

    //$eb->transmitBulletin();
    //$hist->addHistoryItem(38, 'transmit');
    //$eb->errors();
    //$eb->clear();
?>
