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 " ] = "Directive Snippets " ;
37+ $ form ["description " ] = "" ;
38+ $ form ["name " ] = "directive_snippets " ;
39+ $ form ["action " ] = "directive_snippets_edit.php " ;
40+ $ form ["db_table " ] = "directive_snippets " ;
41+ $ form ["db_table_idx " ] = "directive_snippets_id " ;
42+ $ form ["db_history " ] = "yes " ;
43+ $ form ["tab_default " ] = "directive_snippets " ;
44+ $ form ["list_default " ] = "directive_snippets_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 " ]['directive_snippets ' ] = array (
54+ 'title ' => "Directive Snippets " ,
55+ 'width ' => 100 ,
56+ 'template ' => "templates/directive_snippets_edit.htm " ,
57+ 'fields ' => array (
58+ ##################################
59+ # Begin Datatable fields
60+ ##################################
61+ 'name ' => array (
62+ 'datatype ' => 'VARCHAR ' ,
63+ 'formtype ' => 'TEXT ' ,
64+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' ,
65+ 'errmsg ' => 'directive_snippets_name_empty ' ),
66+ 1 => array ( 'type ' => 'UNIQUE ' ,
67+ 'errmsg ' => 'directive_snippets_name_error_unique ' ),
68+ ),
69+ 'default ' => '' ,
70+ 'value ' => '' ,
71+ 'width ' => '30 ' ,
72+ 'maxlength ' => '255 '
73+ ),
74+ 'type ' => array (
75+ 'datatype ' => 'VARCHAR ' ,
76+ 'formtype ' => 'SELECT ' ,
77+ 'default ' => '' ,
78+ 'value ' => array ('apache ' => 'Apache ' ,'nginx ' => 'nginx ' ,'php ' => 'PHP ' ),
79+ ),
80+ 'snippet ' => array (
81+ 'datatype ' => 'TEXT ' ,
82+ 'formtype ' => 'TEXT ' ,
83+ 'default ' => '' ,
84+ 'value ' => '' ,
85+ 'width ' => '30 ' ,
86+ 'maxlength ' => '255 '
87+ ),
88+ 'active ' => array (
89+ 'datatype ' => 'VARCHAR ' ,
90+ 'formtype ' => 'CHECKBOX ' ,
91+ 'default ' => 'y ' ,
92+ 'value ' => array (0 => 'n ' ,1 => 'y ' )
93+ ),
94+ ##################################
95+ # ENDE Datatable fields
96+ ##################################
97+ )
98+ );
99+
100+
101+ ?>
0 commit comments