1+ <?php
2+
3+ //* Title of the form
4+ $ form ["title " ] = "Support Message " ;
5+
6+ //* Description of the form (optional)
7+ $ form ["description " ] = "" ;
8+
9+ //* Name of the form. The name shall not contain spaces or foreign characters
10+ $ form ["name " ] = "support_message " ;
11+
12+ //* The file that is used to call the form in the browser
13+ $ form ["action " ] = "support_message_edit.php " ;
14+
15+ //* The name of the database table that shall be used to store the data
16+ $ form ["db_table " ] = "support_message " ;
17+
18+ //* The name of the database table index field, this field must be a numeric auto increment column
19+ $ form ["db_table_idx " ] = "support_message_id " ;
20+
21+ //* Shall changes to this table be stored in the database history (sys_datalog) table.
22+ //* This should be set to "yes" for all tables that store configuration information.
23+ $ form ["db_history " ] = "no " ; // yes / no
24+
25+ //* The name of the tab that is shown when the form is opened
26+ $ form ["tab_default " ] = "message " ;
27+
28+ //* The name of the default list file of this form
29+ $ form ["list_default " ] = "support_message_list.php " ;
30+
31+ //* Use the internal authentication system for this table. This should
32+ //* be set to yes in most cases
33+ $ form ["auth " ] = 'yes ' ; // yes / no
34+
35+ //* Authentocation presets. The defaults below does not need to be changed in most cases.
36+ $ form ["auth_preset " ]["userid " ] = 0 ; // 0 = id of the user, > 0 id must match with id of current user
37+ $ form ["auth_preset " ]["groupid " ] = 0 ; // 0 = default groupid of the user, > 0 id must match with groupid of current user
38+ $ form ["auth_preset " ]["perm_user " ] = 'riud ' ; //r = read, i = insert, u = update, d = delete
39+ $ form ["auth_preset " ]["perm_group " ] = 'riud ' ; //r = read, i = insert, u = update, d = delete
40+ $ form ["auth_preset " ]["perm_other " ] = '' ; //r = read, i = insert, u = update, d = delete
41+
42+
43+ //* Begin of the form definition of the first tab. The name of the tab is called "message". We refer
44+ //* to this name in the $form["tab_default"] setting above.
45+ $ form ["tabs " ]['message ' ] = array (
46+ 'title ' => "Message " , // Title of the Tab
47+ 'width ' => 100 , // Tab width
48+ 'template ' => "templates/support_message_edit.htm " , // Template file name
49+ 'fields ' => array (
50+ ##################################
51+ # Begin Datatable fields
52+ ##################################
53+ 'recipient_id ' => array (
54+ 'datatype ' => 'INTEGER ' ,
55+ 'formtype ' => 'SELECT ' ,
56+ 'default ' => '' ,
57+ 'datasource ' => array ( 'type ' => 'SQL ' ,
58+ 'querystring ' => 'SELECT userid,username FROM sys_user WHERE {AUTHSQL} ORDER BY username ' ,
59+ 'keyfield ' => 'userid ' ,
60+ 'valuefield ' => 'username '
61+ ),
62+ 'validators ' => array ( 0 => array ( 'type ' => 'ISINT ' ,
63+ 'errmsg ' => 'recipient_id_is_not_integer ' ),
64+ ),
65+ 'value ' => ''
66+ ),
67+ 'sender_id ' => array (
68+ 'datatype ' => 'INTEGER ' ,
69+ 'formtype ' => 'SELECT ' ,
70+ 'default ' => '' ,
71+ 'datasource ' => array ( 'type ' => 'SQL ' ,
72+ 'querystring ' => 'SELECT userid,username FROM sys_user WHERE {AUTHSQL} ORDER BY username ' ,
73+ 'keyfield ' => 'userid ' ,
74+ 'valuefield ' => 'username '
75+ ),
76+ 'validators ' => array ( 0 => array ( 'type ' => 'ISINT ' ,
77+ 'errmsg ' => 'recipient_id_is_not_integer ' ),
78+ ),
79+ 'value ' => ''
80+ ),
81+ 'subject ' => array (
82+ 'datatype ' => 'VARCHAR ' ,
83+ 'formtype ' => 'TEXT ' ,
84+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' ,
85+ 'errmsg ' => 'subject_is_empty ' ),
86+ ),
87+ 'default ' => '' ,
88+ 'value ' => '' ,
89+ 'width ' => '30 ' ,
90+ 'maxlength ' => '255 '
91+ ),
92+ 'message ' => array (
93+ 'datatype ' => 'VARCHAR ' ,
94+ 'formtype ' => 'TEXTAREA ' ,
95+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' ,
96+ 'errmsg ' => 'message_is_empty ' ),
97+ ),
98+ 'default ' => '' ,
99+ 'value ' => '' ,
100+ 'cols ' => '30 ' ,
101+ 'rows ' => '10 ' ,
102+ 'maxlength ' => '255 '
103+ ),
104+ 'tstamp ' => array (
105+ 'datatype ' => 'INTEGER ' ,
106+ 'formtype ' => 'TEXT ' ,
107+ 'default ' => time (),
108+ 'value ' => '' ,
109+ 'width ' => '30 ' ,
110+ 'maxlength ' => '30 '
111+ ),
112+ ##################################
113+ # ENDE Datatable fields
114+ ##################################
115+ )
116+ );
117+
118+
119+
120+ ?>
0 commit comments