Exemplo n.º 1
0
 } else {
     if ($tab == 'subprojects') {
         include_once 'allot.php';
     } else {
         if ($tab == 'sponsors') {
             include_once 'sponsors.php';
         } else {
             if ($tab == 'submissions') {
                 include_once 'submissions.php';
             } else {
                 if ($tab == 'start') {
                     include_once 'getstarted.php';
                 } else {
                     if ($tab == 'news') {
                         print '<div style="float: right;"><a href="rss.php?src=projectevents&p=' . $id . '" title="Project news feed"><img src="images/rss.png" style="border: 0;" alt="RSS" /></a></div>';
                         list($rc, $events) = al_getrecentevents("watch:{$id}-news");
                         if (!$rc && sizeof($events) > 0) {
                             print "<b>Recent Activity:</b><br><nobr>\n";
                             foreach ($events as $event) {
                                 print date("Y-m-d H:i:s T", $event["time"]);
                                 print "&nbsp;&nbsp;<a href=\"" . htmlentities($event["url"]) . "\">";
                                 print htmlentities($event["subject"]);
                                 print "</a><br>\n";
                             }
                             print "</nobr><br>";
                         } else {
                             print "<br><b>There has been no recent activity on this project.</b>";
                             print "<br><br>";
                         }
                         list($rc, $watchers) = al_getwatchers("{$id}-news");
                         if ($rc == 0 && sizeof($watchers) > 0) {
Exemplo n.º 2
0
                 $item->description = formatText($e['body']);
                 $rss->addItem($item);
             }
         }
     }
     $rss->title = '[FF] ' . $pname;
     $rss->description = 'Recent events affecting FOSS Factory project \'' . $pname . '\'';
     $rss->link = $GLOBALS['SITE_URL'] . projurl($pid);
 } else {
     if ($_GET['src'] == 'userevents') {
         include_once "formattext.php";
         $user = scrub($_GET['u']);
         list($rc, $watching) = al_getwatches($user);
         if ($rc == 0) {
             foreach ($watching as $w) {
                 list($rc, $events) = al_getrecentevents('watch:' . $w['eventid']);
                 if ($rc != 0) {
                     continue;
                 }
                 foreach ($events as $e) {
                     $item = new FeedItem();
                     $item->title = $e['subject'];
                     $item->link = $GLOBALS['SITE_URL'] . $e['url'];
                     $item->date = (int) $e['time'];
                     $item->description = formatText($e['body']);
                     $rss->addItem($item);
                 }
             }
         }
         $rss->title = '[FF] ' . $user . '\'s News';
         $rss->description = $user . '\'s FOSS Factory news';