<?
global $lang;
if ( is_array( $this -> _articles ) ) foreach ( $this -> _articles as $art )
{
  $art -> _values['seo_link'] ? $link = $art -> _values['seo_link'] : $link = 'a,' . $art -> _values['id'] . ',' . \System::seo( $art -> _values['title'] );
  ?>
  <div class="article_full">
    <? if ( $art -> _values['show_title'] ):?>
      <div class='article_title'>
        <?= stripslashes( $art -> _values['title'] );?>
      </div>
    <? endif;?>
    <? if ( $art -> _values['show_date'] ):?>
      <div class='article_date'>
        <?= $lang -> getTrans( 'T_DATA_PUBLIKACJI' );?>: <?= date( 'Y-m-d H:s' , strtotime( $art -> _values['date_add'] ) );?>
      </div>
    <? endif;?>
    <? if ( $art -> _values['comments_enabled'] ):?>
      <div class="article_comments_count">
        <a href="<?= $link;?>"><?= $lang -> getTrans( 'T_KOMENTARZE' );?>: <?= count( $art -> _values['comments'] );?></a>
      </div>
    <? endif;?>
    <? if ( $art -> _values['show_author'] ):?>
      <div class='article_draw_author'>
        <? 
          $user = \user\FUser::getUserName( $art -> _values['author'] );
          echo $user['name'] . ' ' . $user['surname'];
        ?>
      </div>
    <? endif;?>
    <? if ( $art -> _values['print'] ):?>
      <a class='print' href='./print.php?art=<?= $art-> _values['id'];?>' target='_blank'>
        <img src='images/system/sico_print.png' alt='<?= $lang -> getTrans( 'T_DRUKUJ' );?>' style='border:0px;'>
      </a>
    <? endif;?>
    <? if ( $art -> _values['thumbnail'] ):?>
      <div class="article-left">
        <div class="article_img">
          <div style="background: url( 'resources/thumber.php?img=<?= $art -> _values['thumbnail'];?>&h=150&w=150' ) no-repeat center;"></div>
        </div>
      </div>
      <div class="article-right">
    <? endif;?>
      <div class='article_text'>
        <?= $art -> getModifyText();?>
      </div>  
      <? if ( is_array( $art -> _values['images'] ) ):?>
        <div class="article_gallery">
          <? foreach ( $art -> _values['images'] as $img ):?>
            <a href='<?= $img['src'];?>' class="fancybox-buttons" rel='<?= $art -> _values['id'];?>'>
              <div class="gallery_picture">
                <div style="background: url( 'resources/thumber.php?img=<?= $img['src'];?>&h=100&w=100' ) no-repeat center;"></div>
              </div>
            </a>
          <? endforeach;?>
          <div class="clearfix"></div>
        </div>
      <? endif;?>
      <? if ( is_array( $art -> _values['files'] ) ):?>
        <ul class="article_files">
          <? foreach ( $art -> _values['files'] as $file ):?>
            <li>
              <a href="pobierz,<?= $file['id'];?>">
                <?= $file['name'];?>
              </a>
            </li>
          <? endforeach;?>
        </ul>
      <? endif;?>
      <div class="clearfix"></div>
    <? if ( $art -> _values['thumbnail'] ):?>
      </div>
      <div class="clearfix"></div>
    <? endif;?>
  </div>
<?
}
?>