Skip to content

Commit e4075b6

Browse files
committed
Added port ranges for firewall.
1 parent d6d7ba5 commit e4075b6

File tree

1 file changed

+111
-111
lines changed

1 file changed

+111
-111
lines changed
Lines changed: 111 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,112 @@
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' => '/^[\s0-9\,]{0,255}$/',
80-
'errmsg'=> 'tcp_ports_error_regex'),
81-
),
82-
'default' => '20,21,22,25,53,80,110,143,443,3306,8080,10000',
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' => '/^[\s0-9\,]{0,255}$/',
92-
'errmsg'=> 'tcp_ports_error_regex'),
93-
),
94-
'default' => '53,3306',
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-
# ENDE Datatable fields
107-
##################################
108-
)
109-
);
110-
111-
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' => '/^[\s0-9\,\:]{0,255}$/',
80+
'errmsg'=> 'tcp_ports_error_regex'),
81+
),
82+
'default' => '20,21,22,25,53,80,110,143,443,3306,8080,10000',
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' => '/^[\s0-9\,\:]{0,255}$/',
92+
'errmsg'=> 'tcp_ports_error_regex'),
93+
),
94+
'default' => '53,3306',
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+
# ENDE Datatable fields
107+
##################################
108+
)
109+
);
110+
111+
112112
?>

0 commit comments

Comments
 (0)