diff options
author | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-06-08 14:06:41 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-06-08 14:06:41 -0400 |
commit | 066b6fd14f91959ff7272d1303ccab273d61ff6a (patch) | |
tree | bffb260b2ae6e8c03d5679bf0b654fdc8fc2b3f2 /website/new/news.php | |
parent | 874512b0792ad4d33020642e710e9f9df1c446ca (diff) | |
download | cobbler-066b6fd14f91959ff7272d1303ccab273d61ff6a.tar.gz cobbler-066b6fd14f91959ff7272d1303ccab273d61ff6a.tar.xz cobbler-066b6fd14f91959ff7272d1303ccab273d61ff6a.zip |
Put cobbler website under version control, some changes still TBA
Diffstat (limited to 'website/new/news.php')
-rwxr-xr-x | website/new/news.php | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/website/new/news.php b/website/new/news.php new file mode 100755 index 00000000..6aa58a87 --- /dev/null +++ b/website/new/news.php @@ -0,0 +1,70 @@ +<?php + $current_page = 'news'; +?> + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + +<head> +<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> +<meta name="description" content="" /> +<meta name="keywords" content="" /> +<title>UMP: Update and Management Platform</title> + + <link rel="stylesheet" href="css/style.css" type="text/css" media="all" /> +</head> + +<body> +<div id="wrap"> +<?php + include("top.html"); +?> + +<div id="main"> +<div id="sidebar"> +<?php + include("nav.php"); +?> +</div> + +<div id="content"> + +<h2>News</h2> + +<?php + +require_once('magpierss/rss_fetch.inc'); + +$url = 'http://cobbler.wordpress.com/feed/'; +$rss = fetch_rss($url); + + foreach ($rss->items as $item) { + $href = $item['link']; + $title = $item['title']; + $body = $item['content']['encoded']; + $author = $item['dc']['creator']; + $category = $item['category']; + $comment_url = $item['comments']; + $raw_timestamp = $item['pubdate']; + $unixtime = strtotime($raw_timestamp); + $timestamp = date('g:i A T j F Y', $unixtime); + + echo "<h3>$title</h3>"; + echo "<p>$body</p>"; + echo "<p class=\"metadata\">Posted $timestamp by $author in $category | <a href=$href>Comment on this!</a></p>"; + } + + +?> + +</div> +</div> +<div id="footer"> +<?php + include("footer.html"); +?> +</div> +</div> +</body> +</html> |