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

title

Body

[close]

/ -> bug_monitor_list_view_inc.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 files README and LICENSE for details
   7  
   8      # --------------------------------------------------------
   9      # $Id: bug_monitor_list_view_inc.php,v 1.14 2005/04/22 22:06:07 prichards Exp $
  10      # --------------------------------------------------------
  11  ?>
  12  <?php
  13      # This include file prints out the list of users monitoring the current
  14      # bug.    $f_bug_id must be set and be set to the bug id
  15  ?>
  16  <?php    if ( access_has_bug_level( config_get( 'show_monitor_list_threshold' ), $f_bug_id ) ) { ?>
  17  <?php
  18      $c_bug_id = db_prepare_int( $f_bug_id );
  19      $t_bug_monitor_table = config_get( 'mantis_bug_monitor_table' );
  20      $t_user_table = config_get( 'mantis_user_table' );
  21  
  22      # get the bugnote data
  23      $query = "SELECT user_id, enabled
  24              FROM $t_bug_monitor_table m, $t_user_table u
  25              WHERE m.bug_id=$c_bug_id AND m.user_id = u.id
  26              ORDER BY u.realname, u.username";
  27      $result = db_query($query);
  28      $num_users = db_num_rows($result);
  29  
  30      echo '<a name="monitors" id="monitors" /><br />';
  31  ?>
  32  
  33  <?php if ( ON == config_get( 'use_javascript' ) ) { ?>
  34  <div id="monitoring_closed" style="display: none;">
  35  <table class="width100" cellspacing="1">
  36  <tr>
  37      <td class="form-title" colspan="2">
  38          <a href="" onclick="ToggleDiv( 'monitoring', g_div_monitoring ); return false;"
  39          ><img border="0" src="images/plus.png" alt="+" /></a>
  40          <?php echo lang_get( 'users_monitoring_bug' ); ?>
  41      </td>
  42  </tr>
  43  </table>
  44  </div>
  45  <?php } ?>
  46  
  47  <div id="monitoring_open">
  48  <table class="width100" cellspacing="1">
  49  <?php     if ( 0 == $num_users ) { ?>
  50  <tr>
  51      <td class="center">
  52          <?php echo lang_get( 'no_users_monitoring_bug' ); ?>
  53      </td>
  54  </tr>
  55  <?php    } else { ?>
  56  <tr>
  57      <td class="form-title" colspan="2">
  58  <?php if ( ON == config_get( 'use_javascript' ) ) { ?>
  59          <a href="" onclick="ToggleDiv( 'monitoring', g_div_monitoring ); return false;"
  60          ><img border="0" src="images/minus.png" alt="-" /></a>
  61  <?php } ?>
  62          <?php echo lang_get( 'users_monitoring_bug' ); ?>
  63      </td>
  64  </tr>
  65  <tr class="row-1">
  66      <td class="category" width="15%">
  67          <?php echo lang_get( 'monitoring_user_list' ); ?>
  68      </td>
  69      <td>
  70  <?php
  71           for ( $i = 0; $i < $num_users; $i++ ) {
  72               $row = db_fetch_array( $result );
  73              echo ($i > 0) ? ', ' : '';
  74              echo print_user( $row['user_id'] );
  75           }
  76  ?>
  77      </td>
  78  </tr>
  79  <?php     } ?>
  80  </table>
  81  </div>
  82  
  83  <?php if ( ON == config_get( 'use_javascript' ) ) { ?>
  84  <script type="text/javascript">
  85  <!--
  86      SetDiv( "monitoring", g_div_monitoring );
  87  -->
  88  </script>
  89  <?php } ?>
  90  
  91  <?php } # show monitor list ?>


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