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 " ] = "tpl_default-v2_admin_head_txt " ;
63+ $ form ["description " ] = "tpl_default-v2_admin_desc_txt " ;
64+ $ form ["name " ] = "tpl_default-v2_admin " ;
65+ $ form ["action " ] = "tpl_default-v2_admin.php " ;
66+ $ form ["db_table " ] = "server_php " ;
67+ $ form ["db_table_idx " ] = "server_php_id " ;
68+ $ form ["db_history " ] = "yes " ;
69+ $ form ["tab_default " ] = "php_name " ;
70+ $ form ["list_default " ] = "server_php_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 " ]['php_name ' ] = array (
80+ 'title ' => "Name " ,
81+ 'width ' => 80 ,
82+ 'template ' => "templates/server_php_name_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+ 'client_id ' => array (
99+ 'datatype ' => 'INTEGER ' ,
100+ 'formtype ' => 'SELECT ' ,
101+ 'default ' => '' ,
102+ 'datasource ' => array ( 'type ' => 'SQL ' ,
103+ 'querystring ' => "SELECT client_id,CONCAT(contact_name,' :: ',username) as name FROM client WHERE {AUTHSQL} ORDER BY contact_name " ,
104+ 'keyfield ' => 'client_id ' ,
105+ 'valuefield ' => 'name '
106+ ),
107+ 'value ' => array (0 => ' ' )
108+ ),
109+ 'name ' => array (
110+ 'datatype ' => 'VARCHAR ' ,
111+ 'formtype ' => 'TEXT ' ,
112+ 'validators ' => array (0 => array ('type ' => 'NOTEMPTY ' ,
113+ 'errmsg ' => 'server_php_name_error_empty ' ),
114+ ),
115+ 'default ' => '' ,
116+ 'value ' => '' ,
117+ 'separator ' => '' ,
118+ 'width ' => '40 ' ,
119+ 'maxlength ' => '255 '
120+ ),
121+ ##################################
122+ # ENDE Datenbankfelder
123+ ##################################
124+ )
125+ );
126+
127+ $ form ["tabs " ]['php_fastcgi ' ] = array (
128+ 'title ' => "FastCGI Settings " ,
129+ 'width ' => 80 ,
130+ 'template ' => "templates/server_php_fastcgi_edit.htm " ,
131+ 'fields ' => array (
132+ ##################################
133+ # Begin Datatable fields
134+ ##################################
135+ 'php_fastcgi_binary ' => array (
136+ 'datatype ' => 'VARCHAR ' ,
137+ 'formtype ' => 'TEXT ' ,
138+ 'default ' => '' ,
139+ 'value ' => '' ,
140+ 'width ' => '40 ' ,
141+ 'maxlength ' => '255 '
142+ ),
143+ 'php_fastcgi_ini_dir ' => array (
144+ 'datatype ' => 'VARCHAR ' ,
145+ 'formtype ' => 'TEXT ' ,
146+ 'default ' => '' ,
147+ 'value ' => '' ,
148+ 'width ' => '40 ' ,
149+ 'maxlength ' => '255 '
150+ ),
151+ ##################################
152+ # ENDE Datatable fields
153+ ##################################
154+ )
155+ );
156+
157+ $ form ["tabs " ]['php_fpm ' ] = array (
158+ 'title ' => "PHP-FPM Settings " ,
159+ 'width ' => 80 ,
160+ 'template ' => "templates/server_php_fpm_edit.htm " ,
161+ 'fields ' => array (
162+ ##################################
163+ # Begin Datatable fields
164+ ##################################
165+ 'php_fpm_init_script ' => array (
166+ 'datatype ' => 'VARCHAR ' ,
167+ 'formtype ' => 'TEXT ' ,
168+ 'default ' => '' ,
169+ 'value ' => '' ,
170+ 'width ' => '40 ' ,
171+ 'maxlength ' => '255 '
172+ ),
173+ 'php_fpm_ini_dir ' => array (
174+ 'datatype ' => 'VARCHAR ' ,
175+ 'formtype ' => 'TEXT ' ,
176+ 'default ' => '' ,
177+ 'value ' => '' ,
178+ 'width ' => '40 ' ,
179+ 'maxlength ' => '255 '
180+ ),
181+ 'php_fpm_pool_dir ' => array (
182+ 'datatype ' => 'VARCHAR ' ,
183+ 'formtype ' => 'TEXT ' ,
184+ 'default ' => '' ,
185+ 'value ' => '' ,
186+ 'width ' => '40 ' ,
187+ 'maxlength ' => '255 '
188+ ),
189+ ##################################
190+ # ENDE Datatable fields
191+ ##################################
192+ )
193+ );
194+ ?>
0 commit comments