1+ <?php
2+
3+ $ form ["title " ] = "IPTables " ;
4+ $ form ["description " ] = "IPTables based firewall " ;
5+ $ form ["name " ] = "iptables " ;
6+ $ form ["action " ] = "iptables_edit.php " ;
7+ $ form ["db_table " ] = "iptables " ;
8+ $ form ["db_table_idx " ] = "iptables_id " ;
9+ $ form ["db_history " ] = "no " ;
10+ $ form ["tab_default " ] = "iptables " ;
11+ $ form ["list_default " ] = "iptables_list.php " ;
12+ //$form["auth"] = 'yes'; // yes / no
13+
14+ //$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
15+ //$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
16+ //$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
17+ //$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
18+ //$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
19+
20+ $ form ["tabs " ]['iptables ' ] = array (
21+ 'title ' => "Rules " ,
22+ 'width ' => "100 " ,
23+ 'template ' => "templates/iptables_edit.htm " ,
24+ 'fields ' => array (
25+ 'server_id ' => array (
26+ 'datatype ' => 'INTEGER ' ,
27+ 'formtype ' => 'SELECT ' ,
28+ 'default ' => '' ,
29+ 'datasource ' => array ( 'type ' => 'SQL ' ,
30+ 'querystring ' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name ' ,
31+ 'keyfield ' => 'server_id ' ,
32+ 'valuefield ' => 'server_name ' ),
33+ 'value ' => ''
34+ ),
35+ 'protocol ' => array (
36+ 'datatype ' => 'VARCHAR ' ,
37+ 'formtype ' => 'SELECT ' ,
38+ 'default ' => '' ,
39+ 'value ' => array ('none ' =>'None ' ,'tcp ' =>'TCP ' ,'udp ' =>'UDP ' ),
40+ 'width ' => '' ,
41+ 'maxlength ' => ''
42+ ),
43+ 'table ' => array (
44+ 'datatype ' => 'VARCHAR ' ,
45+ 'formtype ' => 'SELECT ' ,
46+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' , 'errmsg ' => 'table_error_empty ' )),
47+ 'default ' => 'INPUT ' ,
48+ 'value ' => array ('INPUT ' =>'INPUT ' ,'OUTPUT ' =>'OUTPUT ' ,'FORWARD ' =>'FORWARD ' ),
49+ 'width ' => '' ,
50+ 'maxlength ' => ''
51+ ),
52+ 'source_ip ' => array (
53+ 'datatype ' => 'VARCHAR ' ,
54+ 'formtype ' => 'TEXT ' ,
55+ 'default ' => '' ,
56+ 'value ' => '' ,
57+ 'width ' => '' ,
58+ 'maxlength ' => ''
59+ ),
60+ 'destination_ip ' => array (
61+ 'datatype ' => 'VARCHAR ' ,
62+ 'formtype ' => 'TEXT ' ,
63+ 'default ' => '' ,
64+ 'value ' => '' ,
65+ 'width ' => '' ,
66+ 'maxlength ' => ''
67+ ),
68+ 'singleport ' => array (
69+ 'datatype ' => 'VARCHAR ' ,
70+ 'formtype ' => 'TEXT ' ,
71+ 'default ' => '' ,
72+ 'value ' => '' ,
73+ 'width ' => '' ,
74+ 'maxlength ' => ''
75+ ),
76+ 'multiport ' => array (
77+ 'datatype ' => 'VARCHAR ' ,
78+ 'formtype ' => 'TEXT ' ,
79+ 'default ' => '' ,
80+ 'value ' => '' ,
81+ 'width ' => '' ,
82+ 'maxlength ' => ''
83+ ),
84+ 'state ' => array (
85+ 'datatype ' => 'VARCHAR ' ,
86+ 'formtype ' => 'TEXT ' ,
87+ 'default ' => '' ,
88+ 'value ' => '' ,
89+ 'width ' => '' ,
90+ 'maxlength ' => ''
91+ ),
92+ 'target ' => array (
93+ 'datatype ' => 'VARCHAR ' ,
94+ 'formtype ' => 'SELECT ' ,
95+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' , 'errmsg ' => 'target_error_empty ' )),
96+ 'default ' => '' ,
97+ 'value ' => array ('ACCEPT ' =>'ACCEPT ' ,'DROP ' =>'DROP ' ,'REJECT ' =>'REJECT ' ),
98+ 'width ' => '' ,
99+ 'maxlength ' => ''
100+ ),
101+ 'active ' => array (
102+ 'datatype ' => 'VARCHAR ' ,
103+ 'formtype ' => 'CHECKBOX ' ,
104+ 'default ' => 'y ' ,
105+ 'value ' => array (0 => 'n ' ,1 => 'y ' )
106+ ),
107+ )
108+ );
109+ ?>
0 commit comments