Beispiel #1
0
                                ON cre_username.usr_id = lnk_usr_id_create ';
}
// read weblinks from database
$sql = 'SELECT cat.*, lnk.*, ' . $additionalFields . '
          FROM ' . TBL_CATEGORIES . ' cat, ' . TBL_LINKS . ' lnk
               ' . $additionalTables . '
         WHERE lnk_cat_id = cat_id
           AND cat_org_id = ' . $gCurrentOrganization->getValue('org_id') . '
           AND cat_type = \'LNK\'
      ORDER BY lnk_timestamp_create DESC';
$statement = $gDb->query($sql);
// start defining the RSS Feed
// create RSS feed object with channel information
$rss = new RSSfeed($gCurrentOrganization->getValue('org_longname') . ' - ' . $getHeadline, $gCurrentOrganization->getValue('org_homepage'), $gL10n->get('LNK_LINKS_FROM', $gCurrentOrganization->getValue('org_longname')), $gCurrentOrganization->getValue('org_longname'));
$weblink = new TableWeblink($gDb);
// Dem RSSfeed-Objekt jetzt die RSSitems zusammenstellen und hinzufuegen
while ($row = $statement->fetch()) {
    // submit links to object
    $weblink->clear();
    $weblink->setArray($row);
    // set data for attributes of this entry
    $title = $weblink->getValue('lnk_name');
    $description = '<a href="' . $weblink->getValue('lnk_url') . '" target="_blank">' . $weblink->getValue('lnk_url') . '</a>' . '<br /><br />' . $weblink->getValue('lnk_description');
    $link = $g_root_path . '/adm_program/modules/links/links.php?id=' . $weblink->getValue('lnk_id');
    $author = $row['create_name'];
    $pubDate = date('r', strtotime($weblink->getValue('lnk_timestamp_create')));
    // add entry to RSS feed
    $rss->addItem($title, $description, $link, $author, $pubDate);
}
// jetzt nur noch den Feed generieren lassen
$rss->buildFeed();