b2evolution PHP Cross Reference Blogging Systems

Source: /inc/antispam/views/_antispam_ipranges.form.php - 76 lines - 2848 bytes - Text - Print

Description: This file display the Antispam IP ranges This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}. See also {@link http://sourceforge.net/projects/evocms/}.

   1  <?php
   2  /**

   3   * This file display the Antispam IP ranges

   4   *

   5   * This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}.

   6   * See also {@link http://sourceforge.net/projects/evocms/}.

   7   *

   8   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}.

   9   * Parts of this file are copyright (c)2005 by Daniel HAHLER - {@link http://thequod.de/contact}.

  10   *

  11   * @license http://b2evolution.net/about/license.html GNU General Public License (GPL)

  12   *

  13   * @package admin

  14   *

  15   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}

  16   * @author fplanque: Francois PLANQUE.

  17   *

  18   * @version $Id: _antispam_ipranges.form.php 849 2012-02-16 09:09:09Z attila $

  19   */
  20  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  21  
  22  /**

  23   * @var Slug

  24   */
  25  global $edited_IPRange;
  26  
  27  // Determine if we are creating or updating...

  28  global $action;
  29  $creating = $action == 'iprange_new';
  30  
  31  $Form = new Form( NULL, 'iprange_checkchanges', 'post', 'compact' );
  32  
  33  $Form->global_icon( T_('Cancel editing!'), 'close', regenerate_url( 'action,iprange_ID' ) );
  34  
  35  $Form->begin_form( 'fform', $creating ?  T_('New IP Range') : T_('IP Range') );
  36  
  37      $Form->add_crumb( 'iprange' );
  38      $Form->hidden( 'action',  $creating ? 'iprange_create' : 'iprange_update' );
  39      $Form->hidden_ctrl();
  40      $Form->hidden( 'tab3', param( 'tab3', 'string', '' ) );
  41      $Form->hidden( 'iprange_ID', param( 'iprange_ID', 'integer', 0 ) );
  42  
  43      $aipr_statuses = array(
  44              ''        => T_('Unknown'),
  45              'trusted' => T_('Trusted'),
  46              'suspect' => T_('Suspect'),
  47              'blocked' => T_('Blocked'),
  48          );
  49      $aipr_statuses_color = array(
  50              ''        => '999999',
  51              'trusted' => '00CC00',
  52              'suspect' => 'FFAA00',
  53              'blocked' => 'FF0000',
  54          );
  55      $Form->select_input_array( 'aipr_status', $edited_IPRange->get( 'status' ), $aipr_statuses , 'Status', '', array( 'force_keys_as_values' => true, 'background_color' => $aipr_statuses_color, 'required' => true ) );
  56  
  57      $Form->text_input( 'aipr_IPv4start', int2ip( $edited_IPRange->get( 'IPv4start' ) ), 50, T_('IP Range Start'), '', array( 'maxlength' => 15, 'required' => true ) );
  58  
  59      $Form->text_input( 'aipr_IPv4end', int2ip( $edited_IPRange->get( 'IPv4end' ) ), 50, T_('IP Range End'), '', array( 'maxlength' => 15, 'required' => true ) );
  60  
  61      $Form->info( T_('User count'), (int)$edited_IPRange->get( 'user_count' ) );
  62  
  63      $Form->info( T_('Block count'), (int)$edited_IPRange->get( 'block_count' ) );
  64  
  65  if( $creating )
  66  {
  67      $Form->end_form( array( array( 'submit', 'submit', T_('Record'), 'SaveButton' ),
  68                              array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
  69  }
  70  else
  71  {
  72      $Form->end_form( array( array( 'submit', 'submit', T_('Update'), 'SaveButton' ),
  73                              array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
  74  }
  75  
  76  ?>

title

Description

title

Description

title

Description

title

title

Body