Marius Burkard
2016-04-20 4569cae57f127afd093794310ccd290d2d9fdf36
commit | author | age
6de0aa 1 <?php
F 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:
c35a1b 37     - INTEGER (Wandelt Ausdrücke in Int um)
6de0aa 38     - DOUBLE
c35a1b 39     - CURRENCY (Formatiert Zahlen nach Währungsnotation)
6de0aa 40     - VARCHAR (kein weiterer Format Check)
F 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:
c35a1b 57     Das ID-Feld ist nicht bei den Table Values einzufügen.
6de0aa 58
F 59
60 */
61
b1a6a5 62 $form["title"]    = "Additional PHP Versions";
MC 63 $form["description"]  = "Form to edit additional PHP versions";
64 $form["name"]    = "server_php";
65 $form["action"]   = "server_php_edit.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';
6de0aa 72
F 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 (
b1a6a5 80     'title'  => "Name",
MC 81     'width'  => 80,
82     'template'  => "templates/server_php_name_edit.htm",
83     'fields'  => array (
84         //#################################
85         // Beginn Datenbankfelder
86         //#################################
6de0aa 87         'server_id' => array (
b1a6a5 88             'datatype' => 'INTEGER',
MC 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'  => ''
6de0aa 97         ),
F 98         'client_id' => array (
b1a6a5 99             'datatype' => 'INTEGER',
MC 100             'formtype' => 'SELECT',
101             'default' => '',
102             'datasource' => array (  'type' => 'SQL',
54161b 103                 'querystring' => "(SELECT 0 AS client_id, '' AS name) UNION ALL (SELECT client_id,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM client WHERE {AUTHSQL} ORDER BY contact_name)",
b1a6a5 104                 'keyfield'=> 'client_id',
MC 105                 'valuefield'=> 'name'
106             ),
107             'value'  => array(0 => ' ')
6de0aa 108         ),
F 109         'name' => array (
b1a6a5 110             'datatype' => 'VARCHAR',
MC 111             'formtype' => 'TEXT',
6de0aa 112             'validators' => array(0 => array('type' => 'NOTEMPTY',
b1a6a5 113                     'errmsg' => 'server_php_name_error_empty'),
6de0aa 114             ),
b1a6a5 115             'default' => '',
MC 116             'value'  => '',
117             'separator' => '',
118             'width'  => '40',
119             'maxlength' => '255'
6de0aa 120         ),
b1a6a5 121         //#################################
MC 122         // ENDE Datenbankfelder
123         //#################################
6de0aa 124     )
F 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(
b1a6a5 132         //#################################
MC 133         // Begin Datatable fields
134         //#################################
6de0aa 135         'php_fastcgi_binary' => array(
F 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         ),
b1a6a5 151         //#################################
MC 152         // ENDE Datatable fields
153         //#################################
6de0aa 154     )
F 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(
b1a6a5 162         //#################################
MC 163         // Begin Datatable fields
164         //#################################
6de0aa 165         'php_fpm_init_script' => array(
F 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         ),
b1a6a5 189         //#################################
MC 190         // ENDE Datatable fields
191         //#################################
6de0aa 192     )
F 193 );
b1a6a5 194 ?>