コード例 #1
0
ファイル: indexSuccess.php プロジェクト: TheoJD/portail
<br />
          <?php 
    }
    ?>
          <p>
            <?php 
    echo nl2br($article->getText(ESC_XSSSAFE));
    ?>
          </p>
          <br style="clear: both;" />
        </div>
      <?php 
}
?>
      <?php 
foreach (WeekmailArticleTable::getInstance()->getArticlesForWeekmail($weekmail->getId())->execute() as $article) {
    ?>
        <div class="article">
          <h2 style="background: <?php 
    echo $article->getAsso()->getCouleur();
    ?>
">
            <a href="<?php 
    echo url_for('article_show', $article->getArticle());
    ?>
"><?php 
    echo $article->getName();
    ?>
</a>
            <span class="sub">
              <a href="<?php 
コード例 #2
0
ファイル: actions.class.php プロジェクト: TheoJD/portail
 public function executeHtml()
 {
     $this->weekmail = $this->getRoute()->getObject();
     $this->rows = 10 + WeekmailArticleTable::getInstance()->getEventsForWeekmail($this->weekmail->getId())->count() * 3 + WeekmailArticleTable::getInstance()->getArticlesForWeekmail($this->weekmail->getId())->count() * 3;
     $months = array(1 => 'janvier', 2 => 'février', 3 => 'mars', 4 => 'avril', 5 => 'mai', 6 => 'juin', 7 => 'juillet', 8 => 'août', 9 => 'septembre', 10 => 'octobre', 11 => 'novembre', 12 => 'décembre');
     $datetime = new DateTime($this->weekmail->getPublishedAt());
     $this->date = 'du ';
     $this->date .= $datetime->format("d");
     $old = clone $datetime;
     $datetime->add(new DateInterval('P7D'));
     if ($old->format("m") != $datetime->format("m")) {
         $this->date .= ' ';
         $this->date .= $months[intval($old->format("m"))];
     }
     $this->date .= ' au ';
     $this->date .= $datetime->format("d");
     $this->date .= ' ';
     $this->date .= $months[intval($datetime->format("m"))];
 }