"Fossies" - the Fresh Open Source Software Archive

Member "ispconfig3_install/interface/web/admin/form/firewall.tform.php" (8 Jun 2021, 3237 Bytes) of package /linux/privat/ISPConfig-3.2.5.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "firewall.tform.php": 3.2.4_vs_3.2.5.

    1 <?php
    2 
    3 /*
    4     Form Definition
    5 
    6     Tabledefinition
    7 
    8     Datatypes:
    9     - INTEGER (Forces the input to Int)
   10     - DOUBLE
   11     - CURRENCY (Formats the values to currency notation)
   12     - VARCHAR (no format check, maxlength: 255)
   13     - TEXT (no format check)
   14     - DATE (Dateformat, automatic conversion to timestamps)
   15 
   16     Formtype:
   17     - TEXT (Textfield)
   18     - TEXTAREA (Textarea)
   19     - PASSWORD (Password textfield, input is not shown when edited)
   20     - SELECT (Select option field)
   21     - RADIO
   22     - CHECKBOX
   23     - CHECKBOXARRAY
   24     - FILE
   25 
   26     VALUE:
   27     - Wert oder Array
   28 
   29     Hint:
   30     The ID field of the database table is not part of the datafield definition.
   31     The ID field must be always auto incement (int or bigint).
   32 
   33 
   34 */
   35 
   36 $form["title"]    = "Firewall";
   37 $form["description"]  = "";
   38 $form["name"]    = "firewall";
   39 $form["action"]   = "firewall_edit.php";
   40 $form["db_table"]  = "firewall";
   41 $form["db_table_idx"] = "firewall_id";
   42 $form["db_history"]  = "yes";
   43 $form["tab_default"] = "firewall";
   44 $form["list_default"] = "firewall_list.php";
   45 $form["auth"]   = 'yes'; // yes / no
   46 
   47 $form["auth_preset"]["userid"]  = 0; // 0 = id of the user, > 0 id must match with id of current user
   48 $form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
   49 $form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
   50 $form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
   51 $form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
   52 
   53 $form["tabs"]['firewall'] = array (
   54     'title'  => "Firewall",
   55     'width'  => 100,
   56     'template'  => "templates/firewall_edit.htm",
   57     'fields'  => array (
   58         //#################################
   59         // Begin Datatable fields
   60         //#################################
   61         'server_id' => array (
   62             'datatype' => 'INTEGER',
   63             'formtype' => 'SELECT',
   64             'default' => '',
   65             'validators' => array (  0 => array ( 'type' => 'UNIQUE',
   66                     'errmsg'=> 'firewall_error_unique'),
   67             ),
   68             'datasource' => array (  'type' => 'SQL',
   69                 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name',
   70                 'keyfield'=> 'server_id',
   71                 'valuefield'=> 'server_name'
   72             ),
   73             'value'  => ''
   74         ),
   75         'tcp_port' => array (
   76             'datatype' => 'VARCHAR',
   77             'formtype' => 'TEXT',
   78             'validators' => array (  0 => array ( 'type' => 'REGEX',
   79                     'regex' => '/^$|\d{1,5}(?::\d{1,5})?(?:,\d{1,5}(?::\d{1,5})?)*$/',
   80                     'errmsg'=> 'tcp_ports_error_regex'),
   81             ),
   82             'default' => '21,22,25,53,80,110,143,443,465,587,993,995,3306,4190,8080,8081,40110:40210',
   83             'value'  => '',
   84             'width'  => '30',
   85             'maxlength' => '255'
   86         ),
   87         'udp_port' => array (
   88             'datatype' => 'VARCHAR',
   89             'formtype' => 'TEXT',
   90             'validators' => array (  0 => array ( 'type' => 'REGEX',
   91                     'regex' => '/^$|\d{1,5}(?::\d{1,5})?(?:,\d{1,5}(?::\d{1,5})?)*$/',
   92                     'errmsg'=> 'udp_ports_error_regex'),
   93             ),
   94             'default' => '53',
   95             'value'  => '',
   96             'width'  => '30',
   97             'maxlength' => '255'
   98         ),
   99         'active' => array (
  100             'datatype' => 'VARCHAR',
  101             'formtype' => 'CHECKBOX',
  102             'default' => 'y',
  103             'value'  => array(0 => 'n', 1 => 'y')
  104         ),
  105         //#################################
  106         // END Datatable fields
  107         //#################################
  108     )
  109 );
  110 
  111 
  112 ?>