[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

/admin/ -> system_utils.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   * @todo FIXME: Looks like "From", "to", and "Copy" need i18n. Possibly more in this file.
  19   * @package MantisBT
  20   * @copyright Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
  21   * @copyright Copyright (C) 2002 - 2011  MantisBT Team - mantisbt-dev@lists.sourceforge.net
  22   * @link http://www.mantisbt.org
  23   */
  24  /**
  25   * MantisBT Core API's
  26   */
  27  require_once( dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'core.php' );
  28  
  29  access_ensure_global_level( config_get_global( 'admin_site_threshold' ) );
  30  
  31  html_page_top( 'MantisBT Administration - System Utilities' );
  32  
  33  ?>
  34  <table width="100%" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
  35      <tr class="top-bar">
  36          <td class="links">
  37              [ <a href="index.php">Back to MantisBT Administration</a> ]
  38          </td>
  39          <td class="title">
  40              System Utilities
  41          </td>
  42      </tr>
  43  </table>
  44  <br /><br />
  45  
  46  <table width="80%" bgcolor="#222222" cellpadding="10" cellspacing="1">
  47      <tr><td bgcolor=\"#e8e8e8\" colspan=\"2\"><span class=\"title\">Upgrade Utilities</span></td></tr>
  48  
  49      <!-- # Headings -->
  50      <tr bgcolor="#ffffff"><th width="70%">Description</th><th width="30%">Execute</th></tr>
  51  
  52      <!-- each row links to an upgrade
  53          move database bug attachments to disk -->
  54      <tr bgcolor="#ffffff"><td>Move attachments stored in database schema to disk files.</td><td class="center">
  55      <?php html_button( 'move_db2disk.php', 'Move Attachments to Disk', array( 'doc' => 'attachment' ) );?>
  56      </td></tr>
  57  
  58      <!-- move database project files to disk -->
  59      <tr bgcolor="#ffffff"><td>Move project files stored in database schema to disk.</td><td class="center">
  60      <?php html_button( 'move_db2disk.php', 'Move Project Files to Disk', array( 'doc' => 'project' ) );?>
  61      </td></tr>
  62  
  63      <!-- move custom field content to standard field -->
  64      <tr bgcolor="#ffffff"><td>Copy Custom Field to Standard Field.</td><td class="center">
  65      <form method="post" action="copy_field.php">
  66          From
  67          <SELECT name="source_id">
  68              <?php
  69                  $t_custom_ids = custom_field_get_ids();
  70  foreach( $t_custom_ids as $t_id ) {
  71      printf( "<OPTION VALUE=\"%d\">%s", $t_id, custom_field_get_field( $t_id, 'name' ) );
  72  }
  73  ?>
  74          </SELECT> to
  75          <SELECT name="dest_id">
  76              <?php
  77  /** @todo should be expanded and configurable */
  78  // list matches exact field name from database
  79  $t_dest_ids = array(
  80      'fixed_in_version',
  81  );
  82  foreach( $t_dest_ids as $t_id ) {
  83      printf( "<OPTION VALUE=\"%s\">%s", $t_id, $t_id );
  84  }
  85  ?>
  86          </SELECT>
  87      <input type="submit" class="button" value="Copy" />
  88      </form>
  89      </td></tr>
  90  
  91      <!-- Database Statistics -->
  92      <tr bgcolor="#ffffff"><td>Show database statistics.</td><td class="center">
  93      <?php html_button( 'db_stats.php', 'Display', array() );?>
  94      </td></tr>
  95  
  96  </table>
  97  <?php
  98      html_page_bottom();


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