Source for file display.php
Documentation is available at display.php 
 * @package linea21.modules  
 * @author linea21 <info@linea21.com>  
 * @license http://opensource.org/licenses/gpl-3.0.html  
 * Affichage de la liste des news publique  
 * @return void echo content  
  if ($statut ==  'public') {  
  } else $pas =  SELECT_LIMIT;  
  if ($statut ==  'archives_p') $suffix =  ' "'. strtolower(_t('statut','PA')). '"';  
  $data =  $GLOBALS['sql_object']->DBSelect(SQL_getNewsList($debut, $pas, $statut, $filter, $id_filter));  
  $bdd_nb_com =  $datacount[0]['num_rows'];  
  $bdd_nb_com_display =  '<p>' .  $bdd_nb_com .  ' ' .  _t('news','name2') .  $suffix .  '</p>' .  END_LINE;  
  $content =  '<h1 class="semnone">' .  _t('news','list') .  '</h1>' .  END_LINE;  
    // echo $bdd_nb_com_display;    // affichage du nombre d'enregistrements  
    $current_link =  array('rub' =>  $GLOBALS['links'][LANGUAGE]['news-archives']['linkvalue']);  
    for($i =  0; $i <  count($data); $i++ ) {  
      $link_detail =  array('rub' =>  $GLOBALS['links'][LANGUAGE]['news']['linkvalue'], 'id' =>  $data[$i]['news_id'], 'name' =>  $data[$i]['news_title']);  
      $link_theme =  array('rub' =>  $GLOBALS['links'][LANGUAGE]['news']['linkvalue'], 'filter' =>  $GLOBALS['filters'][LANGUAGE]['theme']['linkvalue'], 'id' =>  $data[$i]['sdtheme_id'], 'name' =>  $data[$i]['sdtheme_name']);  
      $link_level =  array('rub' =>  $GLOBALS['links'][LANGUAGE]['news']['linkvalue'], 'filter' =>  $GLOBALS['filters'][LANGUAGE]['level']['linkvalue'], 'id' =>  $data[$i]['news_level'], 'name' =>  $data[$i]['level_name']);  
      $link_scale =  array('rub' =>  $GLOBALS['links'][LANGUAGE]['news']['linkvalue'], 'filter' =>  $GLOBALS['filters'][LANGUAGE]['scale']['linkvalue'], 'id' =>  $data[$i]['news_scale'], 'name' =>  $data[$i]['scale_denomination']);  
      $link_user =  array('rub' =>  $GLOBALS['links'][LANGUAGE]['user-profile']['linkvalue'], 'id' =>  $data[$i]['news_posted_by'], 'name' =>  $data[$i]['user_login']);  
      $news_title =  formatText($data[$i]['complete_news_title'], '2HTML');  
      $news_sdtheme =  formatText($data[$i]['sdtheme_name'], '2HTML');  
      $level_name =  formatText($data[$i]['level_name'], '2HTML');  
      $scale_denomination =  formatText($data[$i]['scale_denomination'], '2HTML');  
      $news_posted_on =  formatText($data[$i]['news_published_date_display'], '2HTML');  
      $news_posted_by =  formatText($data[$i]['user_login'], '2HTML');  
      $content .=  '<h2 class="nobottommargin"><a href="' .  HrefMaker($link_detail) .  '" title="' .  formatText($news_title, '2ATT') .  '">' .  $news_title .  '</a>' .  END_LINE;  
      $content .=  '<p class="published_by">' .  END_LINE;  
      $content .=  _t('statut','published_on') .  ' ' .  $news_posted_on .  ' ';  
      $content .=  _t('divers','by'). ' <a href="' .  HrefMaker($link_user) .  '" title="' .  $GLOBALS['links'][LANGUAGE]['user-profile']['desc'] .  ' (' .  $news_posted_by .  ')">' .  $news_posted_by .  '</a>';  
      $content .=  '<p class="list_textcontent">' .  $news_header .  '</p>' .  END_LINE;  
      $content .=  '<p class="filter_info">';  
      $content .=  _t('divers','level') .  ' : ';  
      $content .=  '<a href="' .  HrefMaker($link_level) .  '" title="' .  $GLOBALS['filters'][LANGUAGE]['level']['desc'] .  ' : ' .  formatText($level_name, '2ATT') .  '" class="filter_info_level">' .  $level_name .  '</a> ' .  END_LINE;  
      $content .=  _t('divers','themeref') .  ' : ';  
      $content .=  ' <a href="' .  HrefMaker($link_theme) .  '" title="' .  $GLOBALS['filters'][LANGUAGE]['theme']['desc'] .  ' : ' .  formatText($news_sdtheme, '2ATT') .  '" class="filter_info_theme">' .  $news_sdtheme .  '</a>' .  END_LINE;  
      $content .=  _t('divers','scale') .  ' : ';  
      $content .=  ' <a href="' .  HrefMaker($link_scale) .  '" title="' .  $GLOBALS['filters'][LANGUAGE]['scale']['desc'] .  ' : ' .  formatText($scale_denomination, '2ATT') .  '" class="filter_info_scale">' .  $scale_denomination .  '</a></p>' .  END_LINE;  
    $content .=  '<p class="info">' .  _t('divers','nodata') .  '</p>';  
 * Affichage d'une actualté en détail  
 * @return $stat Nom du statut + echo content  
  if (count($data) !=  1) exit;  
    $link_theme =  array('rub' =>  $GLOBALS['links'][LANGUAGE]['news']['linkvalue'], 'filter' =>  $GLOBALS['filters'][LANGUAGE]['theme']['linkvalue'], 'id' =>  $data[0]['theme_sd_theme'], 'name' =>  $data[0]['sdtheme_name']);  
    $link_level =  array('rub' =>  $GLOBALS['links'][LANGUAGE]['news']['linkvalue'], 'filter' =>  $GLOBALS['filters'][LANGUAGE]['level']['linkvalue'], 'id' =>  $data[0]['news_level'], 'name' =>  $data[0]['level_name']);  
    $link_scale =  array('rub' =>  $GLOBALS['links'][LANGUAGE]['news']['linkvalue'], 'filter' =>  $GLOBALS['filters'][LANGUAGE]['scale']['linkvalue'], 'id' =>  $data[0]['news_scale'], 'name' =>  $data[0]['scale_denomination']);  
    $link_user =  array('rub' =>  $GLOBALS['links'][LANGUAGE]['user-profile']['linkvalue'], 'id' =>  $data[0]['news_posted_by'], 'name' =>  $data[0]['user_login']);  
    $link_self =  array('rub' =>  $GLOBALS['links'][LANGUAGE]['news']['linkvalue'], 'id' =>  $news_id);  
    $news_title =  formatText($data[0]['news_title'], '2HTML');  
    $news_template =  $data[0]['news_template'];  
    $news_photo_uri =  $data[0]['news_photo_uri'];  
    $news_sdtheme =  formatText($data[0]['sdtheme_name'], '2HTML');  
    $news_scale_denomination =  formatText($data[0]['scale_denomination'], '2HTML');  
    $news_theme =  formatText($data[0]['theme_name'], '2HTML');  
    $news_level =  formatText($data[0]['level_name'], '2HTML');  
    $news_posted_on =  formatText($data[0]['news_published_date_display'], '2HTML');  
    $news_modify_on =  formatText($data[0]['news_last_modify_display'], '2HTML');  
    $news_posted_by =  formatText($data[0]['user_login'], '2HTML');  
    $news_statut =  $data[0]['news_statut'];  
    $contents =  TemplateFormat($news_title, $news_header, $news_body, $news_template, $news_photo_uri);  
    $content .=  '<h1 class="nobottommargin">' .  $news_title .  '</h1>' .  END_LINE;  
    $content .=  '<p class="published_by">' .  END_LINE;  
    $content .=  _t('statut','published_on') .  ' ' .  $news_posted_on .  ' ';  
    $content .=  _t('divers','by'). ' <a href="' .  HrefMaker($link_user) .  '" title="' .  $GLOBALS['links'][LANGUAGE]['user-profile']['desc'] .  ' (' .  $news_posted_by .  ')">' .  $news_posted_by .  '</a>';  
    if ($news_statut ==  'PA') {  
      $content .=  ' (' .  _t('statut','archived_on') .  ' ' .  $news_modify_on .  ')';  
    $content .=  '<p class="filter_info">' .  END_LINE;  
    $content .=  _t('divers','level') .  ' : ';  
    $content .=  '<a href="' .  HrefMaker($link_level) .  '" title="' .  $GLOBALS['filters'][LANGUAGE]['level']['desc'] .  ' : ' .  formatText($news_level, '2ATT') .  '" class="filter_info_level">' .  $news_level .  '</a> ' .  END_LINE;  
    $content .=  ' ' .  _t('divers','themeref') .  ' : ';  
    $content .=  '<a href="' .  HrefMaker($link_theme) .  '" title="' .  $GLOBALS['filters'][LANGUAGE]['theme']['desc'] .  ' : ' .  formatText($news_sdtheme, '2ATT') .  '" class="filter_info_theme">' .  $news_sdtheme .  '</a> ';  
    //$content .= ' '._t('divers','sousthemeref') . ' :';  
    //$content .= $news_theme . END_LINE;  
    $content .=  ' ' .  _t('divers','scale') .  ' : ';  
    $content .=  '<a href="' .  HrefMaker($link_scale) .  '" title="' .  $GLOBALS['filters'][LANGUAGE]['scale']['desc'] .  ' : ' .  formatText($news_scale_denomination, '2ATT') .  '" class="filter_info_scale">' .  $news_scale_denomination .  '</a>' .  END_LINE;  
 * @return $stat Nom du statut  
 * Affiche ou non 1 lien vers les news a venir ou qui précéde.  
  if ($direction ==  'NEXT') {  
    $title =  _t('news','next_news');  
  if ($direction ==  'PREVIOUS') {  
    $title =  _t('news','prev_news');  
  $data =  $GLOBALS['sql_object']->DBSelect($requete);  
  if ($data ==  false ||  count($data) !=  1) $content =  '';  
    $link_news =  array('rub' =>  $GLOBALS['links'][LANGUAGE]['news']['linkvalue'], 'id' =>  $data[0]['news_id'], 'name' =>  $data[0]['news_title']);  
    $news_complete_title =  formatText($data[0]['news_title'], '2HTML');  
    $content =  '<div class="' .  $class .  '">' .  END_LINE;  
    $content .=  '<a href="' .  HrefMaker($link_news) .  '" title="' .  $title . ' : '. formatText($news_complete_title, '2ATT').  '">' .  $news_title . '</a>';  
 * Mise en page de l'actualité suivant son format  
    list ($body, $body2) =  cutBody($body); 
  if ($template ==  1 ||  $template ==  2) list ($photo1_src) =  GetAllPhotoUri($photouri);  
  if ($template ==  1) $style =  ' class="tplimgleft"';  
  if ($template ==  2 ||  $template ==  3) $style =  ' class="tplimgright"';  
  if ($template !=  4) $content .=  EnlargeImage('../' .  $photo1_src, $style, 'visuel ' .  $title);  
  $content .=  '<p class="chapo">' .  $header .  '</p>' .  END_LINE;  
  $content .=  '<p class="textcontent">' .  $body .  '</p>' .  END_LINE;  
    $style =  ' class="tplimgleft"';  
    $content .=  EnlargeImage('../' .  $photo2_src, $style, 'visuel ' .  $title);  
    $content .=  '<p class="textcontent">' .  $body2 .  '</p>' .  END_LINE;  
  $content .=  '<br style="clear:both" />';  
 
 
        
       |