Statistiques
| Branche: | Révision :

root / src / pip_history.php @ master

Historique | Voir | Annoter | Télécharger (6,61 ko)

1
<?php
2
session_start ();
3
require("headers.php");
4

    
5
/*
6
 * IMPORTANT NOTE: This generated file contains only a subset of huge amount
7
 * of options that can be used with phpMyEdit. To get information about all
8
 * features offered by phpMyEdit, check official documentation. It is available
9
 * online and also for download on phpMyEdit project management page:
10
 *
11
 * http://platon.sk/projects/main_page.php?project_id=5
12
 *
13
 * This file was generated by:
14
 *
15
 *                    phpMyEdit version: unknown
16
 *       phpMyEdit.class.php core class: 1.204
17
 *            phpMyEditSetup.php script: 1.50
18
 *              generating setup script: 1.50
19
 */
20

    
21
//************************/
22
//
23
// Update list of pipet Users
24
//
25
//************************/
26

    
27
mysql_query("DELETE FROM pip_users", $connexion);
28
mysql_query("INSERT INTO pip_users (User) SELECT id FROM lab_members", $connexion);
29
mysql_query("INSERT INTO pip_users (User) SELECT User FROM pip_generic_user", $connexion);
30
mysql_query("DELETE FROM pip_users WHERE User IN (SELECT User FROM pip_nonusers)", $connexion);
31

    
32
/*************************/
33
//
34
// Pass phpMyEdit options
35
//
36
/*************************/
37

    
38

    
39
$opts['dbh'] = $connexion;
40
$opts['tb'] = $tb;
41

    
42
// Name of field which is the unique key
43
$opts['key'] = 'ID';
44

    
45
// Type of key field (int/real/string/date etc.)
46
$opts['key_type'] = 'int';
47

    
48
// Sorting field(s)
49
$opts['sort_field'] = array('ID');
50

    
51
// Number of records to display on the screen
52
// Value of -1 lists all records in a table
53
$opts['inc'] = 15;
54

    
55
// Options you wish to give the users
56
// A - add,  C - change, P - copy, V - view, D - delete,
57
// F - filter, I - initial sort suppressed
58
$opts['options'] = $privopt;
59

    
60
// Number of lines to display on multiple selection filters
61
$opts['multiple'] = '4';
62

    
63
// Navigation style: B - buttons (default), T - text links, G - graphic links
64
// Buttons position: U - up, D - down (default)
65
$opts['navigation'] = 'UDBG';
66

    
67
// Display special page elements
68
$opts['display'] = array(
69
        'form'  => true,
70
        'query' => true,
71
        'sort'  => true,
72
        'time'  => true,
73
        'tabs'  => true
74
);
75

    
76
// Set default prefixes for variables
77
$opts['js']['prefix']               = 'PME_js_';
78
$opts['dhtml']['prefix']            = 'PME_dhtml_';
79
$opts['cgi']['prefix']['operation'] = 'PME_op_';
80
$opts['cgi']['prefix']['sys']       = 'PME_sys_';
81
$opts['cgi']['prefix']['data']      = 'PME_data_';
82

    
83
/* Get the user's default language and use it if possible or you can
84
   specify particular one you want to use. Refer to official documentation
85
   for list of available languages. */
86
$opts['language'] = $_SERVER['HTTP_ACCEPT_LANGUAGE'] . '-UTF8';
87

    
88
/* Table-level filter capability. If set, it is included in the WHERE clause
89
   of any generated SELECT statement in SQL query. This gives you ability to
90
   work only with subset of data from table.
91

92
$opts['filters'] = "column1 like '%11%' AND column2<17";
93
$opts['filters'] = "section_id = 9";
94
$opts['filters'] = "PMEtable0.sessions_count > 200";
95
*/
96

    
97
/* Field definitions
98
   
99
Fields will be displayed left to right on the screen in the order in which they
100
appear in generated list. Here are some most used field options documented.
101

102
['name'] is the title used for column headings, etc.;
103
['maxlen'] maximum length to display add/edit/search input boxes
104
['trimlen'] maximum length of string content to display in row listing
105
['width'] is an optional display width specification for the column
106
          e.g.  ['width'] = '100px';
107
['mask'] a string that is used by sprintf() to format field output
108
['sort'] true or false; means the users may sort the display on this column
109
['strip_tags'] true or false; whether to strip tags from content
110
['nowrap'] true or false; whether this field should get a NOWRAP
111
['select'] T - text, N - numeric, D - drop-down, M - multiple selection
112
['options'] optional parameter to control whether a field is displayed
113
  L - list, F - filter, A - add, C - change, P - copy, D - delete, V - view
114
            Another flags are:
115
            R - indicates that a field is read only
116
            W - indicates that a field is a password field
117
            H - indicates that a field is to be hidden and marked as hidden
118
['URL'] is used to make a field 'clickable' in the display
119
        e.g.: 'mailto:$value', 'http://$value' or '$page?stuff';
120
['URLtarget']  HTML target link specification (for example: _blank)
121
['textarea']['rows'] and/or ['textarea']['cols']
122
  specifies a textarea is to be used to give multi-line input
123
  e.g. ['textarea']['rows'] = 5; ['textarea']['cols'] = 10
124
['values'] restricts user input to the specified constants,
125
           e.g. ['values'] = array('A','B','C') or ['values'] = range(1,99)
126
['values']['table'] and ['values']['column'] restricts user input
127
  to the values found in the specified column of another table
128
['values']['description'] = 'desc_column'
129
  The optional ['values']['description'] field allows the value(s) displayed
130
  to the user to be different to those in the ['values']['column'] field.
131
  This is useful for giving more meaning to column values. Multiple
132
  descriptions fields are also possible. Check documentation for this.
133
*/
134

    
135
$opts['fdd']['ID'] = array(
136
  'name'     => 'ID',
137
  'select'   => 'N',
138
  'options'  => 'LAVCPDR', // auto increment
139
  'maxlen'   => 10,
140
  //'default'  => '0',
141
  'sort'     => true
142
);
143
$opts['fdd']['Date'] = array(
144
  'name'     => 'Date',
145
  'options'  => 'LFAVCPD',
146
  'select'   => 'N',
147
  'maxlen'   => 10,
148
  'sort'     => true,
149
  'default'  => date("Y-m-d", strtotime("now"))
150
);
151
$opts['fdd']['Event_Type'] = array(
152
  'name'     => 'Type of Event',
153
  'select'   => 'D',
154
  'maxlen'   => 30,
155
  'default'  => 'Misc',
156
  'values'   => array(
157
          'table'  => 'pip_events',
158
        'column' => 'Events'),
159
  'sort'     => true
160
);
161
$opts['fdd']['Serial_Number'] = array(
162
  'name'     => 'Pipet Serial Number',
163
  'select'   => 'D',
164
  'maxlen'   => 30,
165
  //'default'  => '0',
166
  'values'   => array(
167
          'table'  => 'pip_stock',
168
        'column' => 'Serial_Number'),
169
  'sort'     => true
170
);
171
$opts['fdd']['Usage_fromNowOn'] = array(
172
  'name'     => 'Usage after this',
173
  'select'   => 'D',
174
  'maxlen'   => 25,
175
  'sort'     => true,
176
  'default'  => 'Misc',
177
  'values'   => array(
178
          'table'  => 'pip_usage',
179
        'column' => 'Usage')
180
);
181
$opts['fdd']['Owner_fromNowOn'] = array(
182
  'name'     => 'Owner after this',
183
  'select'   => 'D',
184
  'maxlen'   => 25,
185
  'sort'     => true,
186
  'values'   => array(
187
          'table'  => 'pip_users',
188
        'column' => 'User')
189
);
190
$opts['fdd']['Comments'] = array(
191
  'name'     => 'Comments',
192
  'select'   => 'T',
193
  'maxlen'   => 1000000000, //4294967295,
194
  'textarea' => array(
195
          'rows' => 5,
196
          'cols' => 50),
197
  'sort'     => true
198
);
199
// TRIGGER
200
// Before displaying the view page
201
$opts['triggers']['select']['pre'][]    = 'pip_history.TSP.php';
202

    
203
require("footers.php");
204
?>