1+ <?php
2+
3+ /*
4+ Copyright (c) 2007, Till Brehm, projektfarm Gmbh
5+ All rights reserved.
6+
7+ Redistribution and use in source and binary forms, with or without modification,
8+ are permitted provided that the following conditions are met:
9+
10+ * Redistributions of source code must retain the above copyright notice,
11+ this list of conditions and the following disclaimer.
12+ * Redistributions in binary form must reproduce the above copyright notice,
13+ this list of conditions and the following disclaimer in the documentation
14+ and/or other materials provided with the distribution.
15+ * Neither the name of ISPConfig nor the names of its contributors
16+ may be used to endorse or promote products derived from this software without
17+ specific prior written permission.
18+
19+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22+ IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+ */
30+
31+ /*
32+ Form Definition
33+
34+ Tabellendefinition
35+
36+ Datentypen:
37+ - INTEGER (Wandelt Ausdrücke in Int um)
38+ - DOUBLE
39+ - CURRENCY (Formatiert Zahlen nach Währungsnotation)
40+ - VARCHAR (kein weiterer Format Check)
41+ - TEXT (kein weiterer Format Check)
42+ - DATE (Datumsformat, Timestamp Umwandlung)
43+
44+ Formtype:
45+ - TEXT (normales Textfeld)
46+ - TEXTAREA (normales Textfeld)
47+ - PASSWORD (Feldinhalt wird nicht angezeigt)
48+ - SELECT (Gibt Werte als option Feld aus)
49+ - RADIO
50+ - CHECKBOX
51+ - FILE
52+
53+ VALUE:
54+ - Wert oder Array
55+
56+ Hinweis:
57+ Das ID-Feld ist nicht bei den Table Values einzufügen.
58+
59+
60+ */
61+
62+ $ form ["title " ] = "IP Addresses " ;
63+ $ form ["description " ] = "Form to edit system IP Addresses " ;
64+ $ form ["name " ] = "server_ip " ;
65+ $ form ["action " ] = "server_ip_edit.php " ;
66+ $ form ["db_table " ] = "server_ip " ;
67+ $ form ["db_table_idx " ] = "server_ip_id " ;
68+ $ form ["db_history " ] = "yes " ;
69+ $ form ["tab_default " ] = "server_ip " ;
70+ $ form ["list_default " ] = "server_ip_list.php " ;
71+ $ form ["auth " ] = 'yes ' ;
72+
73+ $ form ["auth_preset " ]["userid " ] = 0 ; // 0 = id of the user, > 0 id must match with id of current user
74+ $ form ["auth_preset " ]["groupid " ] = 0 ; // 0 = default groupid of the user, > 0 id must match with groupid of current user
75+ $ form ["auth_preset " ]["perm_user " ] = 'riud ' ; //r = read, i = insert, u = update, d = delete
76+ $ form ["auth_preset " ]["perm_group " ] = 'riud ' ; //r = read, i = insert, u = update, d = delete
77+ $ form ["auth_preset " ]["perm_other " ] = '' ; //r = read, i = insert, u = update, d = delete
78+
79+ $ form ["tabs " ]['server_ip ' ] = array (
80+ 'title ' => "IP Address " ,
81+ 'width ' => 80 ,
82+ 'template ' => "templates/server_ip_edit.htm " ,
83+ 'fields ' => array (
84+ ##################################
85+ # Beginn Datenbankfelder
86+ ##################################
87+ 'server_id ' => array (
88+ 'datatype ' => 'INTEGER ' ,
89+ 'formtype ' => 'SELECT ' ,
90+ 'default ' => '' ,
91+ 'datasource ' => array ( 'type ' => 'SQL ' ,
92+ 'querystring ' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name ' ,
93+ 'keyfield ' => 'server_id ' ,
94+ 'valuefield ' => 'server_name '
95+ ),
96+ 'value ' => ''
97+ ),
98+ 'ip_address ' => array (
99+ 'datatype ' => 'VARCHAR ' ,
100+ 'formtype ' => 'TEXT ' ,
101+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' ,
102+ 'errmsg ' => 'ip_error_empty ' ),
103+ 1 => array ( 'type ' => 'UNIQUE ' ,
104+ 'errmsg ' => 'ip_error_unique ' ),
105+ 2 => array ( 'type ' => 'REGEX ' ,
106+ 'regex ' => '/^[0-9\.]{7,15}$/ ' ,
107+ 'errmsg ' => 'ip_err ' ),
108+ ),
109+ 'default ' => '' ,
110+ 'value ' => '' ,
111+ 'separator ' => '' ,
112+ 'width ' => '15 ' ,
113+ 'maxlength ' => '15 ' ,
114+ 'rows ' => '' ,
115+ 'cols ' => ''
116+ ),
117+ 'virtualhost ' => array (
118+ 'datatype ' => 'VARCHAR ' ,
119+ 'formtype ' => 'CHECKBOX ' ,
120+ 'default ' => 'y ' ,
121+ 'value ' => array (0 => 'n ' ,1 => 'y ' )
122+ ),
123+ ##################################
124+ # ENDE Datenbankfelder
125+ ##################################
126+ )
127+ );
128+ ?>
0 commit comments