[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

/ -> bug_reminder_page.php (source)

   1  <?php
   2  # MantisBT - A PHP based bugtracking system
   3  
   4  # MantisBT is free software: you can redistribute it and/or modify
   5  # it under the terms of the GNU General Public License as published by
   6  # the Free Software Foundation, either version 2 of the License, or
   7  # (at your option) any later version.
   8  #
   9  # MantisBT is distributed in the hope that it will be useful,
  10  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12  # GNU General Public License for more details.
  13  #
  14  # You should have received a copy of the GNU General Public License
  15  # along with MantisBT.  If not, see <http://www.gnu.org/licenses/>.
  16  
  17  /**
  18   * @package MantisBT
  19   * @copyright Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
  20   * @copyright Copyright (C) 2002 - 2011  MantisBT Team - mantisbt-dev@lists.sourceforge.net
  21   * @link http://www.mantisbt.org
  22   *
  23   * @uses core.php
  24   * @uses access_api.php
  25   * @uses bug_api.php
  26   * @uses config_api.php
  27   * @uses constant_inc.php
  28   * @uses error_api.php
  29   * @uses form_api.php
  30   * @uses gpc_api.php
  31   * @uses helper_api.php
  32   * @uses html_api.php
  33   * @uses lang_api.php
  34   * @uses print_api.php
  35   */
  36  
  37  /**
  38   * MantisBT Core API's
  39   */
  40  require_once ( 'core.php' );
  41  require_api( 'access_api.php' );
  42  require_api( 'bug_api.php' );
  43  require_api( 'config_api.php' );
  44  require_api( 'constant_inc.php' );
  45  require_api( 'error_api.php' );
  46  require_api( 'form_api.php' );
  47  require_api( 'gpc_api.php' );
  48  require_api( 'helper_api.php' );
  49  require_api( 'html_api.php' );
  50  require_api( 'lang_api.php' );
  51  require_api( 'print_api.php' );
  52  
  53  $f_bug_id = gpc_get_int( 'bug_id' );
  54  
  55  $t_bug = bug_get( $f_bug_id, true );
  56  if( $t_bug->project_id != helper_get_current_project() ) {
  57      # in case the current project is not the same project of the bug we are viewing...
  58      # ... override the current project. This to avoid problems with categories and handlers lists etc.
  59      $g_project_override = $t_bug->project_id;
  60  }
  61  
  62  if ( bug_is_readonly( $f_bug_id ) ) {
  63      error_parameters( $f_bug_id );
  64      trigger_error( ERROR_BUG_READ_ONLY_ACTION_DENIED, ERROR );
  65  }
  66  
  67  access_ensure_bug_level( config_get( 'bug_reminder_threshold' ), $f_bug_id );
  68  
  69  html_page_top( bug_format_summary( $f_bug_id, SUMMARY_CAPTION ) );
  70  ?>
  71  
  72  <?php # Send reminder Form BEGIN ?>
  73  <br />
  74  <div>
  75  <form method="post" action="bug_reminder.php">
  76  <?php echo form_security_field( 'bug_reminder' ) ?>
  77  <input type="hidden" name="bug_id" value="<?php echo $f_bug_id ?>" />
  78  <table class="width75" cellspacing="1">
  79  <tr>
  80      <td class="form-title" colspan="2">
  81          <?php echo lang_get( 'bug_reminder' ) ?>
  82      </td>
  83  </tr>
  84  <tr>
  85      <th class="category">
  86          <?php echo lang_get( 'to' ) ?>
  87      </th>
  88      <th class="category">
  89          <?php echo lang_get( 'reminder' ) ?>
  90      </th>
  91  </tr>
  92  <tr <?php echo helper_alternate_class() ?>>
  93      <td>
  94          <select name="to[]" multiple="multiple" size="10">
  95              <?php
  96                  $t_project_id = bug_get_field( $f_bug_id, 'project_id' );
  97                  $t_access_level = config_get( 'reminder_receive_threshold' );
  98                  if ( $t_bug->view_state === VS_PRIVATE ) {
  99                      $t_private_bug_threshold = config_get( 'private_bug_threshold' );
 100                      if ( $t_private_bug_threshold > $t_access_level ) {
 101                          $t_access_level = $t_private_bug_threshold;
 102                      }
 103                  }
 104                  $t_selected_user_id = 0;
 105                  print_user_option_list( $t_selected_user_id, $t_project_id, $t_access_level );
 106              ?>
 107          </select>
 108      </td>
 109      <td class="center">
 110          <textarea name="body" cols="65" rows="10"></textarea>
 111      </td>
 112  </tr>
 113  <tr>
 114      <td class="center" colspan="2">
 115          <input type="submit" class="button" value="<?php echo lang_get( 'bug_send_button' ) ?>" />
 116      </td>
 117  </tr>
 118  </table>
 119  </form>
 120  <br />
 121  <table class="width75" cellspacing="1">
 122  <tr>
 123      <td>
 124          <?php
 125              echo lang_get( 'reminder_explain' ) . ' ';
 126              if ( ON == config_get( 'reminder_recipients_monitor_bug' ) ) {
 127                  echo lang_get( 'reminder_monitor' ) . ' ';
 128              }
 129              if ( ON == config_get( 'store_reminders' ) ) {
 130                  echo lang_get( 'reminder_store' );
 131              }
 132          ?>
 133      </td>
 134  </tr>
 135  </table>
 136  </div>
 137  
 138  <br />
 139  <?php
 140  $_GET['id'] = $f_bug_id;
 141  $tpl_fields_config_option = 'bug_view_page_fields';
 142  $tpl_show_page_header = false;
 143  $tpl_force_readonly = true;
 144  $tpl_mantis_dir = dirname( __FILE__ ) . DIRECTORY_SEPARATOR;
 145  $tpl_file = __FILE__;
 146  
 147  define ( 'BUG_VIEW_INC_ALLOW', true );
 148  include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'bug_view_inc.php' );


Generated: Thu Jul 28 15:48:31 2011 Cross-referenced by PHPXref 0.7