index.phtml 780 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. $output = Request::param ('output', 'normal');
  3. $token = $this->conf->token();
  4. $token_param = Request::param ('token', '');
  5. $token_is_ok = ($token != '' && $token == $token_param);
  6. if(!login_is_conf ($this->conf) ||
  7. is_logged() ||
  8. $this->conf->anonAccess() == 'yes' ||
  9. ($output == 'rss' && $token_is_ok)) {
  10. if($output == 'rss') {
  11. $this->renderHelper ('view/rss_view');
  12. } elseif($output == 'reader') {
  13. $this->renderHelper ('view/reader_view');
  14. } elseif($output == 'global') {
  15. $this->renderHelper ('view/global_view');
  16. } else {
  17. $this->renderHelper ('view/normal_view');
  18. }
  19. } else {
  20. ?>
  21. <div class="post content">
  22. <h1><?php echo Translate::t ('forbidden_access'); ?></h1>
  23. <p><?php echo Translate::t ('forbidden_access_description'); ?></p>
  24. </div>
  25. <?php
  26. }