File:  [mozdev] / br / www / sobre / midia / index.html
Revision 1.10: download - view: text, annotated - select for diffs - revision graph
Sat Nov 12 22:48:36 2011 UTC (7 years, 4 months ago) by hultmann
Branches: MAIN
CVS tags: HEAD
*** empty log message ***

<?php

if (!defined('PROJECT_PATH')) {
  define('PROJECT_PATH', realpath('../..'));
}
require PROJECT_PATH . '/protected/template.php';


final class WebPage extends Template {

  function writeHtmlTitle() {
    echo 'Na mídia';
  }

  function writeHtmlHead() {
    echo '<link rel="alternate" type="application/atom+xml" href="/sobre/midia/?atom" title="Mozilla na mídia">';
    echo '<link rel="stylesheet" type="text/css" href="/local.css">';
  }


  function writeHtmlFeatureTitle() {
    echo <<<HTML_SOURCE
<h1>Na mídia - Notícias veiculadas sobre o Firefox e Thunderbird
<a href="/sobre/midia/?atom" rel="alternate" type="application/atom+xml" title="Utilize este endereço no seu agregador de notícias" onclick="return window.confirm('Aviso: Este link deve ser copiado para um agregador RSS\\r\\nou para um favorito RSS do Firefox.');">
<img class="rss" src="/images/livemarks16.png" alt="Ícone RSS" width="16" height="16">
</a>
</h1>
HTML_SOURCE;
  }


  function writeHtmlContentMain() {

   $this->loadPhp('feedenumerator.php');
   $news = new FeedEnumerator('media');
   echo '<ul class="news" style="list-style-image:none">';
   while ($news->MoveNext()) {
      echo '<li><div class="date" style="width:6.5em">';
      echo date('d/m/Y', $news->EntryIssued());
      echo '</div>';
      echo $news->EntryContent();
      echo '</li>';
   }
   echo '</ul>';
  }

}


$query = Template::getQueryString();
if ($query[''] === 'atom') {
  require PROJECT_PATH . DIRECTORY_SEPARATOR . 'protected' . DIRECTORY_SEPARATOR . 'atomrender.php';
  require PROJECT_PATH . DIRECTORY_SEPARATOR . 'protected' . DIRECTORY_SEPARATOR . 'feedenumerator.php';
  $src = new FeedEnumerator('media');
  $atom = new AtomRender();
  $atom->Render($src, 10);

} else {
  $page = new WebPage();
  $page->render();
}

?>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>