aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
blob: 272e98539eb3ee1d99f947994310104b12cb77c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php include("include/header.php"); ?>
<?php include_once("include/autoloader.php"); ?>

<div class="container" role="main">
	<div class="alert alert-success" role="alert">Latest images: <strong>Replicant 6.0 0003</strong>. Replicant supports up to <strong>13</strong> different devices!</div>
	<div class="row">
		<div class="col-md-8">
			<div class="panel panel-default">
				<div class="panel-heading"><h3 class="panel-title"><span class="glyphicon glyphicon-pencil"></span> <a href="//blog.replicant.us/">Replicant blog</a></h3></div>
				<div class="panel-body">
<?php
$feed = new SimplePie();

$feed->set_feed_url("http://blog.replicant.us/feed/");
$feed->set_cache_location("cache/");

$feed_init = $feed->init();

if ($feed->error() || !$feed_init) {
	print("\t\t\t\t\t<div class=\"alert alert-danger\" role=\"alert\">Loading RSS feed failed</div>\n");
} else {
	$count = 1;

	foreach ($feed->get_items() as $item) {
		print("\t\t\t\t\t<div class=\"page-header\"><h3><a href=\"".$item->get_permalink()."\">".$item->get_title()."</a></h3><small>Posted on <strong>".$item->get_date("j F Y")."</strong> by <strong>".$item->get_author()->get_name()."</strong></small></div>\n");
		print("\t\t\t\t\t<p>".$item->get_description()."</p>\n");

		if ($count++ >= 10)
			break;
	}
}
?>
				</div>
			</div>
		</div>
		<div class="col-md-4">
			<div class="panel panel-default">
				<div class="panel-heading"><span class="glyphicon glyphicon-user"></span> <a href="//redmine.replicant.us/projects/replicant/boards">Replicant forums</a></div>
				<ul class="list-group">
<?php
$feed = new SimplePie();

$feed->set_feed_url("http://redmine.replicant.us/projects/replicant/activity.atom?show_messages=1");
$feed->set_cache_location("cache/");

$feed_init = $feed->init();

if ($feed->error() || !$feed_init) {
	print("\t\t\t\t\t<li class=\"list-group-item list-group-item-danger\">Loading RSS feed failed</li>\n");
} else {
	$count = 1;

	foreach ($feed->get_items() as $item) {
		print("\t\t\t\t\t<li class=\"list-group-item\"><a href=\"".$item->get_permalink()."\">".$item->get_title()."</a><br /><small>Posted on <strong>".$item->get_date("j F Y")."</strong> by <strong>".$item->get_author()->get_name()."</strong></small></li>\n");

		if ($count++ >= 8)
			break;
	}
}
?>
				</ul>
			</div>
		</div>
	</div>
</div>

<?php include("include/footer.php"); ?>