From 24503e3abe705acde2df159aeae61be0d009f92e Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Wed, 19 Nov 2008 17:27:03 -0500 Subject: Imported sources --- rss.php | 334 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 334 insertions(+) create mode 100644 rss.php (limited to 'rss.php') diff --git a/rss.php b/rss.php new file mode 100644 index 0000000..c9e866f --- /dev/null +++ b/rss.php @@ -0,0 +1,334 @@ +'); + +?> + + + Four Island<?php +if (isset($_GET['mode'])) +{ + switch ($_GET['mode']) + { + case 'blog': + if (isset($_GET['blog'])) + { + switch ($_GET['blog']) + { + case 'author': +?> Blog Posts by <?php + echo($_GET['author']); + break; + case 'tag': +?> Blog Posts tagged with <?php + echo($_GET['tag']); + break; + } + } else { +?> Blog Posts<?php + } + break; + case 'quotes': +?> Quotes<?php + break; + case 'poll': +?> Polls<?php + break; + case 'projects': +?> Projects<?php + break; + case 'comments': +?> Comments<?php + break; + } +} +?> + + An archive of all Four Island blog posts written by An archive of all Four Island blog posts tagged with An archive of all Four Island blog postsAn archive of all Four Island quotesAn archive of all of the Four Island POTWsAn archive of all of the Four Island Project checkinsAn archive of all of the comments people have left on Four IslandAll the wonderfour going-ons on Four Island + + en + +setRespository('http://svn.fourisland.com/' . $name); +// $svn->setAuth('hatkirby','popstartwo506'); + $logs = $svn->getFileLogs(''); + + $k=0; + while (($items[$i] = $logs[$k])) + { + $items[$i]['sortDate'] = strtotime($items[$i]['date']); + $items[$i]['itemType'] = 'project'; + $items[$i]['project'] = $name; + $i++; + $k++; + } + } +} + +if (!isset($_GET['mode']) || ($_GET['mode'] == 'comments')) +{ + $getcomments = "SELECT * FROM comments ORDER BY id DESC LIMIT 0,10"; + $getcomments2 = mysql_query($getcomments); + while ($items[$i] = mysql_fetch_array($getcomments2)) + { + $items[$i]['sortDate'] = strtotime($items[$i]['posttime']); + $items[$i]['itemType'] = 'comment'; + + $page_id = $items[$i]['page_id']; + $comType = substr($page_id,0,strpos($page_id,'-')); + $comID = substr($page_id,strpos($page_id,'-')+1); + + switch ($comType) + { + case 'updates': + $getpost = "SELECT * FROM updates WHERE id = " . $comID; + $getpost2 = mysql_query($getpost); + $getpost3 = mysql_fetch_array($getpost2); + + $items[$i]['title'] = $getpost3['title']; + $items[$i]['url'] = 'blog/' . $getpost3['slug'] . '/'; + break; + case 'poll': + $getpoll = "SELECT * FROM polloftheweek WHERE id = " . $comID; + $getpoll2 = mysql_query($getpoll); + $getpoll3 = mysql_fetch_array($getpoll2); + + $items[$i]['title'] = $getpoll3['question']; + $items[$i]['url'] = 'poll/' . $getpoll3['id'] . '.php'; + break; + case 'quote': + $getquote = "SELECT * FROM rash_quotes WHERE id = " . $comID; + $getquote2 = mysql_query($getquote); + $getquote3 = mysql_fetch_array($getquote2); + + $items[$i]['title'] = '#' . $getquote3['id']; + $items[$i]['url'] = 'quotes/' . $getquote3['id'] . '.php'; + break; + } + $i++; + } +} + +function sortItems($a, $b) +{ + if ($a['sortDate'] < $b['sortDate']) + { + return 1; + } else if ($a['sortDate'] == $b['sortDate']) + { + return 0; + } else if ($a['sortDate'] > $b['sortDate']) + { + return -1; + } +} + +uasort($items,"sortItems"); + +$j=0; +foreach ($items as $key => $value) +{ + switch ($value['itemType']) + { + case 'post': +?> + + <?php echo($value['title']); ?> + + http://www.fourisland.com/blog// + + + + + + + + Quote #<?php echo($value['id']); ?> + + http://www.fourisland.com/quotes/.php + + + + + + + + <?php echo($value['project']); ?> r<?php echo($value['version']); ?> - <?php echo($title); ?> + + http://www.fourisland.com/projects//changeset/ + + + + + + + + Comment on <?php echo($value['title']); ?> by <?php echo($value['username']); ?> + + http://www.fourisland.com/comments// + + + + + + + + -- cgit 1.4.1