We will not give your email to anyone for any reason, it will only be used to share monthly updates about EthicalSystems.org.




fetchAll();
$id = “Newsletter”;

$category = db_query(‘SELECT cid, title, block FROM {aggregator_category} WHERE title = :title’, array(‘:title’ => $id))->fetchObject();

$block[‘subject’] = check_plain($category->title);
$result = db_query_range(‘SELECT i.* FROM {aggregator_category_item} ci LEFT JOIN {aggregator_item} i ON ci.iid = i.iid WHERE ci.cid = :cid ORDER BY i.timestamp DESC, i.iid DESC’, 0, $category->block, array(‘:cid’ => $category->cid));

$output = $result -> fetchAll();
//print_r($output);

/*
foreach ($output as $key => $item) {
if (!preg_match(“/Newsletter/”, $item->title)) {
unset($output[$key]);
}
}
*/

$counter = 0;
foreach ($output as $item) {
$counter++;
echo “


“.$item->title.”

“;
$text = $item->description;
$text = str_replace(“#6DC6DD”, “#5ca20d”, $text);
$text = str_replace(“#0000CD”, “#5ca20d”, $text);

/*
preg_match_all(“/width=\”(\d+)\” style=\”max-width: \d+.px;/”, $text, $find);
$replacements = $find[1];
$find = $find[0];
print_r($find);
for ($i=1; $i“, ““, $text);
$text = str_replace(“

“, “

“, $text);
$text = str_replace(““);

$substring = substr($text,strpos($text,”

“)+2);

$text = str_replace($substring,””,$text);
*/
echo “

“.$text.”

“;

if ($limit > 0 && $limit == $counter)
break;
}

//print_r($category);

?>