[ PHPXref.com ] [ Generated: Sun Jul 20 18:33:16 2008 ] [ Mantis 1.0.2 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> news_list_page.php (source)

   1  <?php
   2      # Mantis - a php based bugtracking system
   3      # Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
   4      # Copyright (C) 2002 - 2004  Mantis Team   - mantisbt-dev@lists.sourceforge.net
   5      # This program is distributed under the terms and conditions of the GPL
   6      # See the README and LICENSE files for details
   7  
   8      # --------------------------------------------------------
   9      # $Id: news_list_page.php,v 1.31 2005/02/12 20:01:06 jlatour Exp $
  10      # --------------------------------------------------------
  11  ?>
  12  <?php
  13      require_once ( 'core.php' );
  14  
  15      $t_core_path = config_get( 'core_path' );
  16  
  17      require_once( $t_core_path.'news_api.php' );
  18      require_once( $t_core_path.'string_api.php' );
  19  ?>
  20  <?php
  21      access_ensure_project_level( VIEWER );
  22  ?>
  23  <?php html_page_top1() ?>
  24  <?php html_page_top2() ?>
  25  
  26  <br />
  27  <ul>
  28  <?php
  29      # Select the news posts
  30      $rows = news_get_rows( helper_get_current_project() );
  31      # Loop through results
  32      for ( $i=0 ; $i < sizeof( $rows ) ; $i++ ) {
  33          extract( $rows[$i], EXTR_PREFIX_ALL, 'v' );
  34          if ( VS_PRIVATE == $v_view_state &&
  35               ! access_has_project_level( config_get( 'private_news_threshold' ), $v_project_id ) )         {
  36              continue;
  37          }
  38  
  39          $v_headline     = string_display( $v_headline );
  40          $v_date_posted     = date( config_get( 'complete_date_format' ), $v_date_posted );
  41  
  42          $t_notes = array();
  43          $t_note_string = '';
  44          if ( 1 == $v_announcement ) {
  45              array_push( $t_notes, lang_get( 'announcement' ) );
  46          }
  47          if ( VS_PRIVATE == $v_view_state ) {
  48              array_push( $t_notes, lang_get( 'private' ) );
  49          }
  50          if ( sizeof( $t_notes ) > 0 ) {
  51              $t_note_string = '['.implode( ' ', $t_notes ).']';
  52          }
  53  
  54          echo "<li><span class=\"italic-small\">$v_date_posted</span> - <span class=\"bold\"><a href=\"news_view_page.php?news_id=$v_id\">$v_headline</a></span> <span class=\"small\"> ";
  55          print_user( $v_poster_id );
  56          echo ' ' . $t_note_string;
  57          echo "</span></li>";
  58      }  # end for loop
  59  ?>
  60  </ul>
  61  
  62  <?php html_page_bottom1( __FILE__ ) ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]