[ Index ] |
|
Code source de Mantis 1.1.0rc3 |
1 <?php 2 # Mantis - a php based bugtracking system 3 4 # Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org 5 # Copyright (C) 2002 - 2007 Mantis Team - mantisbt-dev@lists.sourceforge.net 6 7 # Mantis is free software: you can redistribute it and/or modify 8 # it under the terms of the GNU General Public License as published by 9 # the Free Software Foundation, either version 2 of the License, or 10 # (at your option) any later version. 11 # 12 # Mantis is distributed in the hope that it will be useful, 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # GNU General Public License for more details. 16 # 17 # You should have received a copy of the GNU General Public License 18 # along with Mantis. If not, see <http://www.gnu.org/licenses/>. 19 20 # -------------------------------------------------------- 21 # $Id: main_page.php,v 1.59.2.1 2007-10-13 22:33:22 giallu Exp $ 22 # -------------------------------------------------------- 23 24 # This is the first page a user sees when they login to the bugtracker 25 # News is displayed which can notify users of any important changes 26 27 require_once ( 'core.php' ); 28 29 $t_core_path = config_get( 'core_path' ); 30 31 require_once( $t_core_path.'current_user_api.php' ); 32 require_once( $t_core_path.'news_api.php' ); 33 require_once( $t_core_path.'date_api.php' ); 34 require_once( $t_core_path.'print_api.php' ); 35 require_once( $t_core_path.'rss_api.php' ); 36 37 access_ensure_project_level( VIEWER ); 38 39 $f_offset = gpc_get_int( 'offset', 0 ); 40 41 $t_project_id = helper_get_current_project(); 42 43 $t_rss_enabled = config_get( 'rss_enabled' ); 44 45 if ( OFF != $t_rss_enabled ) { 46 $t_rss_link = rss_get_news_feed_url( $t_project_id ); 47 html_set_rss_link( $t_rss_link ); 48 } 49 50 html_page_top1(); 51 html_page_top2(); 52 53 if ( !current_user_is_anonymous() ) { 54 echo '<div class="quick-summary-left">'; 55 echo lang_get( 'open_and_assigned_to_me' ) . ': '; 56 echo '<a class="subtle" href="view_all_set.php?type=1&handler_id=' . auth_get_current_user_id() . '&hide_status=' . RESOLVED . '">' . current_user_get_assigned_open_bug_count() . '</a>'; 57 echo '</div>'; 58 59 echo '<div class="quick-summary-right">'; 60 echo lang_get( 'open_and_reported_to_me' ) . ': '; 61 echo '<a class="subtle" href="view_all_set.php?type=1&reporter_id=' . auth_get_current_user_id() . '&hide_status=' . RESOLVED . '">' . current_user_get_reported_open_bug_count() . '</a>'; 62 echo '</div>'; 63 64 echo '<div class="quick-summary-left">'; 65 echo lang_get( 'last_visit' ) . ': '; 66 echo print_date( config_get( 'normal_date_format' ), db_unixtimestamp( current_user_get_field( 'last_visit' ) ) ); 67 echo '</div>'; 68 } 69 70 echo '<br />'; 71 echo '<br />'; 72 echo '<br />'; 73 74 $t_news_rows = news_get_limited_rows( $f_offset, $t_project_id ); 75 $t_news_count = count( $t_news_rows ); 76 77 # Loop through results 78 for ( $i = 0; $i < $t_news_count; $i++ ) { 79 $t_row = $t_news_rows[$i]; 80 81 # only show VS_PRIVATE posts to configured threshold and above 82 if ( ( VS_PRIVATE == $t_row[ 'view_state' ] ) && 83 !access_has_project_level( config_get( 'private_news_threshold' ) ) ) { 84 continue; 85 } 86 87 print_news_entry_from_row( $t_row ); 88 echo '<br />'; 89 } # end for loop 90 91 echo '<div align="center">'; 92 93 print_bracket_link( 'news_list_page.php', lang_get( 'archives' ) ); 94 $t_news_view_limit = config_get( 'news_view_limit' ); 95 $f_offset_next = $f_offset + $t_news_view_limit; 96 $f_offset_prev = $f_offset - $t_news_view_limit; 97 98 if ( $f_offset_prev >= 0) { 99 print_bracket_link( 'main_page.php?offset=' . $f_offset_prev, lang_get( 'newer_news_link' ) ); 100 } 101 102 if ( $t_news_count == $t_news_view_limit ) { 103 print_bracket_link( 'main_page.php?offset=' . $f_offset_next, lang_get( 'older_news_link' ) ); 104 } 105 106 if ( OFF != $t_rss_enabled ) { 107 print_bracket_link( $t_rss_link, lang_get( 'rss' ) ); 108 } 109 110 echo '</div>'; 111 112 html_page_bottom1( __FILE__ ); 113 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 09:42:17 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |