aboutsummaryrefslogtreecommitdiff
path: root/app/views/index/index.phtml
blob: bd18d2d77c414863cbad30b4bc79c37802a00bdc (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
<?php

$output = Request::param ('output', 'normal');
$token = $this->conf->token();
$token_param = Request::param ('token', '');
$token_is_ok = ($token != '' && $token == $token_param);

if(!login_is_conf ($this->conf) ||
   is_logged() ||
   $this->conf->anonAccess() == 'yes' ||
   ($output == 'rss' && $token_is_ok)) {
	if($output == 'rss') {
		$this->renderHelper ('view/rss_view');
	} elseif($output == 'reader') {
		$this->renderHelper ('view/reader_view');
	} elseif($output == 'global') {
		$this->renderHelper ('view/global_view');
	} else {
		$this->renderHelper ('view/normal_view');
	}
} else {
?>
<div class="post content">
	<h1><?php echo Translate::t ('forbidden_access'); ?></h1>
	<p><?php echo Translate::t ('forbidden_access_description'); ?></p>
	<p><a href="<?php echo _url ('index', 'about'); ?>"><?php echo Translate::t ('about_freshrss'); ?></a></p>
</div>
<?php
}