| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- function showForbidden() {
- ?><div class="post content">
- <h1><?php echo Minz_Translate::t ('forbidden_access'); ?></h1>
- <p><?php echo Minz_Configuration::canLogIn() ?
- Minz_Translate::t ('forbidden_access_description') :
- Minz_Translate::t ('forbidden_access') . ' (' . Minz_Configuration::authType() . ')'; ?></p>
- <p><a href="<?php echo _url ('index', 'about'); ?>"><?php echo Minz_Translate::t ('about_freshrss'); ?></a></p>
- </div><?php
- }
- $output = Minz_Request::param ('output', 'normal');
- if ($this->loginOk || Minz_Configuration::allowAnonymous()) {
- if ($output === 'normal') {
- $this->renderHelper ('view/normal_view');
- } elseif ($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');
- }
- } elseif ($output === 'rss') {
- $token = $this->conf->token;
- $token_param = Minz_Request::param ('token', '');
- $token_is_ok = ($token != '' && $token == $token_param);
- if ($token_is_ok) {
- $this->renderHelper ('view/rss_view');
- } else {
- showForbidden();
- }
- } else {
- showForbidden();
- }
|