Line 1... |
Line 1... |
1 |
<?php
|
1 |
<?php
|
- |
|
2 |
|
- |
|
3 |
/*
|
- |
|
4 |
* changed 'default'=>'null' to 'default'=>null
|
- |
|
5 |
*/
|
2 |
define ( MAX_INPUT_FIELD_DISPLAY, 40 ); // this is the maximum input field size
|
6 |
define ( MAX_INPUT_FIELD_DISPLAY, 40 ); // this is the maximum input field size
|
3 |
define ( IMAGE_DIRECTORY, '/pictures/' ); // relative URL where pictures are stored
|
7 |
define ( IMAGE_DIRECTORY, '/pictures/' ); // relative URL where pictures are stored
|
4 |
define ( EDIT_IMAGE_HEIGHT, 100 ); // height for thumbnail of pictuers
|
8 |
define ( EDIT_IMAGE_HEIGHT, 100 ); // height for thumbnail of pictuers
|
5 |
define ( MAX_UPLOAD_FILE_SIZE, 1024*1024*10 ); // 10 meg
|
9 |
define ( MAX_UPLOAD_FILE_SIZE, 1024*1024*10 ); // 10 meg
|
6 |
define (DEFAULT_TEXTAREA_HEIGHT, 5 );
|
10 |
define (DEFAULT_TEXTAREA_HEIGHT, 5 );
|
Line 15... |
Line 19... |
15 |
'display name' => 'System Control',
|
19 |
'display name' => 'System Control',
|
16 |
'display columns' => array('_system_id','group_name','key_name','theValue'),
|
20 |
'display columns' => array('_system_id','group_name','key_name','theValue'),
|
17 |
'display query' => 'select _system_id,group_name,theValue,key_name,added_date from _system',
|
21 |
'display query' => 'select _system_id,group_name,theValue,key_name,added_date from _system',
|
18 |
'field info' => array(
|
22 |
'field info' => array(
|
19 |
/* date record was closed */
|
23 |
/* date record was closed */
|
20 |
'removed_date' => array('type' => 'datetime', 'required' => false, 'default'=>'null' ),
|
24 |
'removed_date' => array('type' => 'datetime', 'required' => false, 'default'=>null ),
|
21 |
'_system_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int'),
|
25 |
'_system_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int'),
|
22 |
/* used to group keys together */
|
26 |
/* used to group keys together */
|
23 |
'group_name' => array('required' => true , 'type' => 'string' , 'width' => 64),
|
27 |
'group_name' => array('required' => true , 'type' => 'string' , 'width' => 64),
|
24 |
/* the actual value of this entry */
|
28 |
/* the actual value of this entry */
|
25 |
'theValue' => array('type' => 'text'),
|
29 |
'theValue' => array('type' => 'text'),
|
Line 36... |
Line 40... |
36 |
'display name' => 'Device Attributes',
|
40 |
'display name' => 'Device Attributes',
|
37 |
'display columns' => array('name'),
|
41 |
'display columns' => array('name'),
|
38 |
'display query' => 'select attrib.attrib_id,name from attrib',
|
42 |
'display query' => 'select attrib.attrib_id,name from attrib',
|
39 |
'field info' => array(
|
43 |
'field info' => array(
|
40 |
/* date record was deleted/supserceded */
|
44 |
/* date record was deleted/supserceded */
|
41 |
'removed_date' => array('type' => 'datetime', 'required' => false, 'default'=>'null' ),
|
45 |
'removed_date' => array('type' => 'datetime', 'required' => false, 'default'=>null ),
|
42 |
/* the visible displayed name */
|
46 |
/* the visible displayed name */
|
43 |
'name' => array('required' => true , 'type' => 'string' , 'width' => 64),
|
47 |
'name' => array('required' => true , 'type' => 'string' , 'width' => 64),
|
44 |
/* date record was added */
|
48 |
/* date record was added */
|
45 |
'added_date' => array('required' => true , 'type' => 'datetime'),
|
49 |
'added_date' => array('required' => true , 'type' => 'datetime'),
|
46 |
'attrib_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10)
|
50 |
'attrib_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10)
|
Line 53... |
Line 57... |
53 |
'display name' => 'Clients',
|
57 |
'display name' => 'Clients',
|
54 |
'display columns' => array('name','added_date'),
|
58 |
'display columns' => array('name','added_date'),
|
55 |
'display query' => 'select client.client_id,name,added_date from client',
|
59 |
'display query' => 'select client.client_id,name,added_date from client',
|
56 |
'field info' => array(
|
60 |
'field info' => array(
|
57 |
/* date record was deleted/supserceded */
|
61 |
/* date record was deleted/supserceded */
|
58 |
'removed_date' => array('type' => 'datetime', 'required' => false, 'default'=>'null' ),
|
62 |
'removed_date' => array('type' => 'datetime', 'required' => false, 'default'=>null ),
|
59 |
/* These are internal notes visible only to us */
|
63 |
/* These are internal notes visible only to us */
|
60 |
'internal_notes' => array('type' => 'text'),
|
64 |
'internal_notes' => array('type' => 'text'),
|
61 |
/* world visible notes on the client */
|
65 |
/* world visible notes on the client */
|
62 |
'notes' => array('type' => 'text'),
|
66 |
'notes' => array('type' => 'text'),
|
63 |
/* the visible displayed name */
|
67 |
/* the visible displayed name */
|
Line 74... |
Line 78... |
74 |
'display name' => 'Sites',
|
78 |
'display name' => 'Sites',
|
75 |
'display columns' => array('Client', 'Site'),
|
79 |
'display columns' => array('Client', 'Site'),
|
76 |
'display query' => 'select site.site_id,client.name Client,site.name Site from site join client using (client_id) order by client.name',
|
80 |
'display query' => 'select site.site_id,client.name Client,site.name Site from site join client using (client_id) order by client.name',
|
77 |
'field info' => array(
|
81 |
'field info' => array(
|
78 |
/* date record was deleted/supserceded */
|
82 |
/* date record was deleted/supserceded */
|
79 |
'removed_date' => array('type' => 'datetime', 'required' => false, 'default'=>'null' ),
|
83 |
'removed_date' => array('type' => 'datetime', 'required' => false, 'default'=>null ),
|
80 |
/* Just a place to record some notes */
|
84 |
/* Just a place to record some notes */
|
81 |
'notes' => array('type' => 'text'),
|
85 |
'notes' => array('type' => 'text'),
|
82 |
/* the visible displayed name */
|
86 |
/* the visible displayed name */
|
83 |
'name' => array('required' => true , 'type' => 'string' , 'width' => 64),
|
87 |
'name' => array('required' => true , 'type' => 'string' , 'width' => 64),
|
84 |
'client_id' => array('type' => 'lookup', 'table' => 'client', 'keyfield' => 'client_id', 'display_field' => 'name'),
|
88 |
'client_id' => array('type' => 'lookup', 'table' => 'client', 'keyfield' => 'client_id', 'display_field' => 'name'),
|
Line 98... |
Line 102... |
98 |
join device_type on device.device_type_id = device_type.device_type_id
|
102 |
join device_type on device.device_type_id = device_type.device_type_id
|
99 |
order by device_type.show_as_system desc, device_type.name, device.name',
|
103 |
order by device_type.show_as_system desc, device_type.name, device.name',
|
100 |
'field info' => array(
|
104 |
'field info' => array(
|
101 |
'part_of' => array('type' => 'lookup', 'table' => 'device', 'keyfield' => 'device_id', 'display_field' => 'name', 'null_ok' => true ),
|
105 |
'part_of' => array('type' => 'lookup', 'table' => 'device', 'keyfield' => 'device_id', 'display_field' => 'name', 'null_ok' => true ),
|
102 |
/* date record was deleted/supserceded */
|
106 |
/* date record was deleted/supserceded */
|
103 |
'removed_date' => array('type' => 'datetime', 'required' => false, 'default'=>'null' ),
|
107 |
'removed_date' => array('type' => 'date', 'required' => false, 'default'=>null ),
|
104 |
'device_type_id' => array('type' => 'lookup', 'table' => 'device_type', 'keyfield' => 'device_type_id', 'display_field' => 'name'),
|
108 |
'device_type_id' => array('type' => 'lookup', 'table' => 'device_type', 'keyfield' => 'device_type_id', 'display_field' => 'name'),
|
105 |
/* the visible displayed name */
|
109 |
/* the visible displayed name */
|
106 |
'name' => array('required' => true , 'type' => 'string' , 'width' => 255),
|
110 |
'name' => array('required' => true , 'type' => 'string' , 'width' => 255),
|
107 |
'site_id' => array('type' => 'lookup', 'table' => 'site', 'keyfield' => 'site_id', 'display_field' => 'name'),
|
111 |
'site_id' => array('type' => 'lookup', 'table' => 'site', 'keyfield' => 'site_id', 'display_field' => 'name'),
|
108 |
'device_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
|
112 |
'device_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
|
Line 126... |
Line 130... |
126 |
from device_attrib join device using (device_id)
|
130 |
from device_attrib join device using (device_id)
|
127 |
join device_type using (device_type_id)
|
131 |
join device_type using (device_type_id)
|
128 |
join attrib using (attrib_id)
|
132 |
join attrib using (attrib_id)
|
129 |
order by device_type.show_as_system desc, device.name,attrib.name',
|
133 |
order by device_type.show_as_system desc, device.name,attrib.name',
|
130 |
'field info' => array(
|
134 |
'field info' => array(
|
131 |
'removed_date' => array('type' => 'datetime', 'required' => false, 'default'=>'null' ),
|
135 |
'removed_date' => array('type' => 'datetime', 'required' => false, 'default'=>null ),
|
132 |
/* The actual value of this attribute. */
|
136 |
/* The actual value of this attribute. */
|
133 |
'value' => array('type' => 'text'),
|
137 |
'value' => array('type' => 'text'),
|
134 |
'device_id' => array('type' => 'lookup', 'table' => 'device', 'keyfield' => 'device_id', 'display_field' => 'name'),
|
138 |
'device_id' => array('type' => 'lookup', 'table' => 'device', 'keyfield' => 'device_id', 'display_field' => 'name'),
|
135 |
'device_attrib_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int'),
|
139 |
'device_attrib_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int'),
|
136 |
/* date record was added */
|
140 |
/* date record was added */
|
Line 145... |
Line 149... |
145 |
'display name' => 'Device Types',
|
149 |
'display name' => 'Device Types',
|
146 |
'display columns' => array('System','Name'),
|
150 |
'display columns' => array('System','Name'),
|
147 |
'display query' => 'select removed_date,device_type_id,name Name,added_date,show_as_system System from device_type',
|
151 |
'display query' => 'select removed_date,device_type_id,name Name,added_date,show_as_system System from device_type',
|
148 |
'field info' => array(
|
152 |
'field info' => array(
|
149 |
/* date record was deleted/supserceded */
|
153 |
/* date record was deleted/supserceded */
|
150 |
'removed_date' => array('type' => 'datetime', 'required' => false, 'default'=>'null' ),
|
154 |
'removed_date' => array('type' => 'datetime', 'required' => false, 'default'=>null ),
|
151 |
'device_type_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
|
155 |
'device_type_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
|
152 |
/* the visible displayed name */
|
156 |
/* the visible displayed name */
|
153 |
'name' => array('required' => true , 'type' => 'string' , 'width' => 64),
|
157 |
'name' => array('required' => true , 'type' => 'string' , 'width' => 64),
|
154 |
/* date record was added */
|
158 |
/* date record was added */
|
155 |
'added_date' => array('required' => true , 'type' => 'datetime'),
|
159 |
'added_date' => array('required' => true , 'type' => 'datetime'),
|
Line 163... |
Line 167... |
163 |
'display name' => 'Login',
|
167 |
'display name' => 'Login',
|
164 |
'display columns' => array('email','Restrictions','Added'),
|
168 |
'display columns' => array('email','Restrictions','Added'),
|
165 |
'display query' => 'select removed_date Removed,where_clause Restrictions,email,added_date Added,login_id from login',
|
169 |
'display query' => 'select removed_date Removed,where_clause Restrictions,email,added_date Added,login_id from login',
|
166 |
'field info' => array(
|
170 |
'field info' => array(
|
167 |
/* date record was closed */
|
171 |
/* date record was closed */
|
168 |
'removed_date' => array('type' => 'datetime', 'required' => false, 'default'=>'null' ),
|
172 |
'removed_date' => array('type' => 'datetime', 'required' => false, 'default'=>null ),
|
169 |
/* the encrypted password of the user */
|
173 |
/* the encrypted password of the user */
|
170 |
'pass' => array('type' => 'string' , 'width' => 32),
|
174 |
'pass' => array('type' => 'string' , 'width' => 32),
|
171 |
/* clause that limits what a user can see */
|
175 |
/* clause that limits what a user can see */
|
172 |
'where_clause' => array('type' => 'text'),
|
176 |
'where_clause' => array('type' => 'text'),
|
173 |
/* email address used as login id */
|
177 |
/* email address used as login id */
|