* * @package SendStudio */ // Make sure that the IEM controller does NOT redirect request. if (!defined('IEM_NO_CONTROLLER')) { define('IEM_NO_CONTROLLER', true); } // Displaying an rss feed doesn't need a session. if (!defined('IEM_NO_SESSION')) { define('IEM_NO_SESSION', true); } // Require base sendstudio functionality. This connects to the database, sets up our base paths and so on. require_once dirname(__FILE__) . '/admin/index.php'; if (SENDSTUDIO_IS_SETUP != 1) { exit; } /** * This file lets us get api's, load language files and parse templates. */ require_once(SENDSTUDIO_FUNCTION_DIRECTORY . '/sendstudio_functions.php'); if (!check('rss', true)) { exit; } $sendstudio_functions = new Sendstudio_Functions(); $sendstudio_functions->LoadLanguageFile('frontend'); $listid = (isset($_GET['List'])) ? (int)$_GET['List'] : 0; if (isset($_GET['L'])) { $listid = (int)$_GET['L']; } $baselink = SENDSTUDIO_APPLICATION_URL . '/rss.php?'; if ($listid) { $baselink .= 'List=' . $listid; } $extra_url = ''; if (isset($_GET['M'])) { $extra_url = '&M=' . (int)$_GET['M'] . '&'; if (isset($_GET['C'])) { $extra_url .= 'C=' . urlencode($_GET['C']); } } $list_api = $sendstudio_functions->GetApi('Lists'); $title = GetLang('NewsletterArchives'); if ($listid > 0) { $list_loaded = $list_api->Load($listid); if ($list_loaded) { $title = sprintf(GetLang('NewsletterArchives_List'), $list_api->Get('name')); } } $number_to_show = 10; if (isset($_GET['Fetch'])) { $fetch = (int)$_GET['Fetch']; if ($fetch > 0) { $number_to_show = $fetch; } } header("Content-Type: text/xml"); $datenow = date("r"); echo '<'; ?> ?xml version="1.0" encoding="" ?> ?xml-stylesheet href="/rssdisplay.php" type="text/xsl"?> <?php echo htmlspecialchars($title, ENT_QUOTES, SENDSTUDIO_CHARSET); ?> N/A 20 GetArchives($listid, $number_to_show); if (empty($archived_newsletters)) { ?> <?php echo GetLang('NewsletterArchives_NoneSent'); ?> $newsletter_details) { $author = $newsletter_details['fullname']; if (!$author) { $author = $newsletter_details['username']; } if (!empty($newsletter_details['htmlbody'])) { $summary = $newsletter_details['htmlbody']; $summary = preg_replace('%<(style|script).*?%si', ' ', $summary); $summary = preg_replace('%<(br|div|td|tr|li|p).*?>%si', ' ', $summary); $summary = str_replace(' ', ' ', $summary); $summary = strip_tags($summary); } elseif (!empty($newsletter_details['textbody'])) { $summary = $newsletter_details['textbody']; } else { $summary = ''; } ?> <?php echo htmlspecialchars($newsletter_details['subject'], ENT_QUOTES, SENDSTUDIO_CHARSET); ?> ]]>