b2evolution PHP Cross Reference Blogging Systems

Source: /inc/maintenance/views/_backup.form.php - 112 lines - 3221 bytes - Text - Print

Description: This file is part of b2evolution - {@link http://b2evolution.net/} See also {@link http://sourceforge.net/projects/evocms/}.

   1  <?php
   2  /**
   3   * This file is part of b2evolution - {@link http://b2evolution.net/}
   4   * See also {@link http://sourceforge.net/projects/evocms/}.
   5   *
   6   * @copyright (c)2009-2014 by Francois PLANQUE - {@link http://fplanque.net/}
   7   * Parts of this file are copyright (c)2009 by The Evo Factory - {@link http://www.evofactory.com/}.
   8   *
   9   * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
  10   *
  11   * {@internal Open Source relicensing agreement:
  12   * The Evo Factory grants Francois PLANQUE the right to license
  13   * The Evo Factory's contributions to this file and the b2evolution project
  14   * under any OSI approved OSS license (http://www.opensource.org/licenses/).
  15   * }}
  16   *
  17   * @package maintenance
  18   *
  19   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  20   * @author efy-maxim: Evo Factory / Maxim.
  21   * @author fplanque: Francois Planque.
  22   *
  23   * @version $Id: _backup.form.php 6143 2014-03-10 14:29:28Z yura $
  24   */
  25  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  26  
  27  /**
  28   * @var back up configuration
  29   */
  30  global $backup_paths, $backup_tables, $backup_path;
  31  
  32  /**
  33   * @var action
  34   */
  35  global $action;
  36  
  37  /**
  38   * @var instance of Backup class
  39   */
  40  global $current_Backup;
  41  
  42  
  43  $Form = new Form( NULL, 'backup_settings', 'post' );
  44  
  45  
  46  $Form->begin_form( 'fform', T_('Backup application files and data') );
  47  
  48  echo '<p>Your backups will be saved into the directory: <b>'.$backup_path.'</b> (on your web server).</p>';
  49  
  50  $Form->hiddens_by_key( get_memorized( 'action' ) );
  51  
  52  // Backup settings for folders and files
  53  $Form->begin_fieldset( T_( 'Folders & files' ), array( 'class'=>'fieldset clear' ) );
  54  
  55  // Display checkboxes
  56  foreach( $backup_paths as $name => $settings )
  57  {
  58      if( !is_null( $settings['label'] ) )
  59      {
  60          $note = '';
  61          if( array_key_exists( 'note', $settings ) )
  62          {
  63              $note = $settings['note'];
  64          }
  65          else
  66          {
  67              $note = get_affected_paths( $settings['path'] );
  68          }
  69  
  70          $Form->checkbox( 'bk_'.$name, $current_Backup->backup_paths[$name], $settings['label'], $note );
  71      }
  72  }
  73  
  74  $Form->end_fieldset();
  75  
  76  // Backup settings for database tables
  77  $Form->begin_fieldset( T_( 'Database tables' ), array( 'class'=>'fieldset clear' ) );
  78  
  79  // Display checkboxes
  80  foreach( $backup_tables as $name => $settings )
  81  {
  82      $note = '';
  83      if( array_key_exists( 'note', $settings ) )
  84      {
  85          $note = $settings['note'];
  86      }
  87      else
  88      {
  89          $note = get_affected_tables( $settings['table'] );
  90      }
  91  
  92      $Form->checkbox( 'bk_'.$name, $current_Backup->backup_tables[$name], $settings['label'], $note );
  93  }
  94  
  95  $Form->end_fieldset();
  96  
  97  // Enable/Disable maintenance mode
  98  $Form->begin_fieldset( T_( 'General Options' ), array( 'class'=>'fieldset clear' ) );
  99  
 100  $Form->checkbox( 'bk_maintenance_mode', true, T_( 'Maintenance mode' ), T_( 'Put b2evolution into Maintenance Mode while backing up - Recommended' ) );
 101  
 102  if( function_exists('gzopen') )
 103  {
 104      $Form->checkbox( 'bk_pack_backup_files', $current_Backup->pack_backup_files, 'ZIP', T_('Compress backup files into ZIP archive.') );
 105  }
 106  $Form->add_crumb( 'backup' );
 107  $Form->end_fieldset();
 108  
 109  $Form->end_form( array( array( 'submit', 'actionArray[backup]', T_('Backup'), 'SaveButton' ),
 110                                                  array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
 111  
 112  ?>

title

Description

title

Description

title

Description

title

title

Body