Statistiques
| Branche: | Révision :

root / src / strains.php @ d072e29c

Historique | Voir | Annoter | Télécharger (10,83 ko)

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

    
5
// if (array_key_exists("action", $_REQUEST)) {
6
//   if ($_REQUEST["action"] == "SEARCH_IN_GENOTYPE") {
7
//     $keys = split(" ", $_REQUEST["geno"]); 
8
//     print_r($keys );
9
// 
10
//     $tmp_filter = "ynl095c:PBY-306-ynl095C";
11
//     $likes = "";
12
//     foreach ($keys as $k) {
13
//       if ($k != "") {
14
//         $likes .= "`locus1` LIKE '%$k%' OR `locus2` LIKE '%$k%' OR `locus3` LIKE '%$k%' OR `locus4` LIKE '%$k%' OR `locus5` LIKE '%$k%' OR `ADE2` LIKE '%$k%' OR `HIS3` LIKE '%$k%' OR `LEU2` LIKE '%$k%' OR `LYS2` LIKE '%$k%' OR `MET15` LIKE '%$k%' OR `TRP1` LIKE '%$k%' OR `URA3` LIKE '%$k%' OR `HO_` LIKE '%$k%' OR `Cytoplasmic_Character` LIKE '%$k%' OR `extrachromosomal_plasmid` LIKE '%$k%'";
15
//       }
16
//     }
17
//     $opts["filters"] = $likes . " " ;
18
//   }
19
// }
20
// 
21
// if (!array_key_exists("PME_sys_operation", $_REQUEST)) {
22
//   if (array_key_exists("geno", $_REQUEST)) {
23
//     $geno = $_REQUEST["geno"]; 
24
//   } else {
25
//     $geno = "";
26
//   }
27
//   echo "<form action='' method='post'>";
28
//   //echo "<fieldset style='border:1px plain black; width: 300px;'>";
29
//   //echo "<legend>Search in genotype</legend>";
30
//   echo "Search in genotype: <input type='hidden' name='action' value='SEARCH_IN_GENOTYPE'/>";
31
//   echo "<input type='text' name='geno' value='$geno'/>";
32
//   echo "<input type='button' name='send' value='Search' onclick='return this.form.submit();'/>";
33
// //  echo "</fieldset>";
34
//   echo "</form>";
35
// }
36

    
37
/*
38
 * IMPORTANT NOTE: This generated file contains only a subset of huge amount
39
 * of options that can be used with phpMyEdit. To get information about all
40
 * features offered by phpMyEdit, check official documentation. It is available
41
 * online and also for download on phpMyEdit project management page:
42
 *
43
 * http://platon.sk/projects/main_page.php?project_id=5
44
 *
45
 * This file was generated by:
46
 *
47
 *                    phpMyEdit version: unknown
48
 *       phpMyEdit.class.php core class: 1.204
49
 *            phpMyEditSetup.php script: 1.50
50
 *              generating setup script: 1.50
51
 */
52

    
53

    
54
/*************************/
55
//
56
// Pass phpMyEdit options
57
//
58
/*************************/
59

    
60
$opts['dbh'] = $connexion;
61
$opts['tb'] = $tb;
62

    
63
// Name of field which is the unique key
64
$opts['key'] = 'ID';
65

    
66
// Type of key field (int/real/string/date etc.)
67
$opts['key_type'] = 'int';
68

    
69
// Sorting field(s)
70
$opts['sort_field'] = array('ID');
71

    
72
// Number of records to display on the screen
73
// Value of -1 lists all records in a table
74
$opts['inc'] = 15;
75

    
76
// Options you wish to give the users
77
// A - add,  C - change, P - copy, V - view, D - delete,
78
// F - filter, I - initial sort suppressed
79
$opts['options'] = $privopt;
80

    
81
// Number of lines to display on multiple selection filters
82
$opts['multiple'] = '4';
83

    
84
// Navigation style: B - buttons (default), T - text links, G - graphic links
85
// Buttons position: U - up, D - down (default)
86
$opts['navigation'] = 'UDBG';
87

    
88
// Display special page elements
89
$opts['display'] = array(
90
        'form'  => true,
91
        'query' => true,
92
        'sort'  => true,
93
        'time'  => true,
94
        'tabs'  => true
95
);
96

    
97
// Set default prefixes for variables
98
$opts['js']['prefix']               = 'PME_js_';
99
$opts['dhtml']['prefix']            = 'PME_dhtml_';
100
$opts['cgi']['prefix']['operation'] = 'PME_op_';
101
$opts['cgi']['prefix']['sys']       = 'PME_sys_';
102
$opts['cgi']['prefix']['data']      = 'PME_data_';
103

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

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

113
$opts['filters'] = "column1 like '%11%' AND column2<17";
114
$opts['filters'] = "section_id = 9";
115
$opts['filters'] = "PMEtable0.sessions_count > 200";
116
*/
117

    
118
/* Field definitions
119
   
120
Fields will be displayed left to right on the screen in the order in which they
121
appear in generated list. Here are some most used field options documented.
122

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

    
156
$opts['fdd']['ID'] = array(
157
  'name'     => 'ID',
158
  'select'   => 'N',
159
  //'options'  => 'LAVCPDR', // auto increment
160
  'maxlen'   => 10,
161
  'default'  => '0',
162
  'sort'     => true
163
);
164
$opts['fdd']['Name_'] = array(
165
  'name'     => 'Name ',
166
  'select'   => 'T',
167
  'maxlen'   => 25,
168
  'sort'     => true
169
);
170
$opts['fdd']['Other_names'] = array(
171
  'name'     => 'Other names',
172
  'select'   => 'T',
173
  'maxlen'   => 25,
174
  'sort'     => true
175
);
176
$opts['fdd']['Comments'] = array(
177
  'name'     => 'Comments',
178
  'select'   => 'T',
179
  'maxlen'   => 1000000000, //4294967295,
180
  'textarea' => array(
181
          'rows' => 5,
182
          'cols' => 50),
183
  'sort'     => true
184
);
185
$opts['fdd']['General_Background'] = array(
186
  'name'     => 'General Background',
187
  'select'   => 'D',
188
  'maxlen'   => 25,
189
  'sort'     => true,
190
  'values'   => array(
191
          'table'  => 'st_general_backgrounds',
192
        'column' => 'background')
193
);
194
$opts['fdd']['Mating_Type'] = array(
195
  'name'     => 'Mating Type',
196
  'select'   => 'D',
197
  'maxlen'   => 25,
198
  'sort'     => true,
199
  'values'   => array(
200
          'table'  => 'st_MAT',
201
        'column' => 'alleles')
202
);
203
$opts['fdd']['ADE2'] = array(
204
  'name'     => 'ADE2',
205
  'select'   => 'D',
206
  'maxlen'   => 25,
207
  'sort'     => true,
208
  'values'   => array(
209
          'table'  => 'st_ADE2',
210
        'column' => 'alleles')
211
);
212
$opts['fdd']['HIS3'] = array(
213
  'name'     => 'HIS3',
214
  'select'   => 'D',
215
  'maxlen'   => 25,
216
  'sort'     => true,
217
  'values'   => array(
218
          'table'  => 'st_HIS3',
219
        'column' => 'alleles')
220
);
221
$opts['fdd']['LEU2'] = array(
222
  'name'     => 'LEU2',
223
  'select'   => 'D',
224
  'maxlen'   => 50,
225
  'sort'     => true,
226
  'values'   => array(
227
          'table'  => 'st_LEU2',
228
        'column' => 'alleles')
229
);
230
$opts['fdd']['LYS2'] = array(
231
  'name'     => 'LYS2',
232
  'select'   => 'D',
233
  'maxlen'   => 25,
234
  'sort'     => true,
235
  'values'   => array(
236
          'table'  => 'st_LYS2',
237
        'column' => 'alleles')
238
);
239
$opts['fdd']['MET15'] = array(
240
  'name'     => 'MET15',
241
  'select'   => 'D',
242
  'maxlen'   => 25,
243
  'sort'     => true,
244
  'values'   => array(
245
          'table'  => 'st_MET15',
246
        'column' => 'alleles')
247
);
248
$opts['fdd']['TRP1'] = array(
249
  'name'     => 'TRP1',
250
  'select'   => 'D',
251
  'maxlen'   => 25,
252
  'sort'     => true,
253
  'values'   => array(
254
          'table'  => 'st_TRP1',
255
        'column' => 'alleles')
256
);
257
$opts['fdd']['URA3'] = array(
258
  'name'     => 'URA3',
259
  'select'   => 'D',
260
  'maxlen'   => 25,
261
  'sort'     => true,
262
  'values'   => array(
263
          'table'  => 'st_URA3',
264
        'column' => 'alleles')
265
);
266
$opts['fdd']['HO_'] = array(
267
  'name'     => 'HO ',
268
  'select'   => 'T',
269
  'maxlen'   => 25,
270
  'sort'     => true
271
);
272
$opts['fdd']['locus1'] = array(
273
  'name'     => 'Locus1',
274
  'select'   => 'T',
275
  'maxlen'   => 75,
276
  'sort'     => true
277
);
278
$opts['fdd']['locus2'] = array(
279
  'name'     => 'Locus2',
280
  'select'   => 'T',
281
  'maxlen'   => 50,
282
  'sort'     => true
283
);
284
$opts['fdd']['locus3'] = array(
285
  'name'     => 'Locus3',
286
  'select'   => 'T',
287
  'maxlen'   => 50,
288
  'sort'     => true
289
);
290
$opts['fdd']['locus4'] = array(
291
  'name'     => 'Locus4',
292
  'select'   => 'T',
293
  'maxlen'   => 25,
294
  'sort'     => true
295
);
296
$opts['fdd']['locus5'] = array(
297
  'name'     => 'Locus5',
298
  'select'   => 'T',
299
  'maxlen'   => 50,
300
  'sort'     => true
301
);
302
$opts['fdd']['Parental_strain'] = array(
303
  'name'     => 'Parental strain',
304
  'options'  => 'AVCPD',
305
  'select'   => 'T',
306
  'maxlen'   => 25,
307
  'sort'     => true
308
);
309
$opts['fdd']['Obtained_by'] = array(
310
  'name'     => 'Obtained by',
311
  'options'  => 'AVCPD',
312
  'select'   => 'T',
313
  'maxlen'   => 25,
314
  'sort'     => true
315
);
316
$opts['fdd']['Checkings'] = array(
317
  'name'     => 'Checkings',
318
  'options'  => 'AVCPD',
319
  'select'   => 'T',
320
  'maxlen'   => 225,
321
  'sort'     => true
322
);
323
$opts['fdd']['Cytoplasmic_Character'] = array(
324
  'name'     => 'Cytoplasmic Character',
325
  'select'   => 'T',
326
  'maxlen'   => 25,
327
  'sort'     => true
328
);
329
$opts['fdd']['extrachromosomal_plasmid'] = array(
330
  'name'     => 'Extrachromosomal plasmid',
331
  'select'   => 'T',
332
  'maxlen'   => 50,
333
  'sort'     => true
334
);
335
$opts['fdd']['Reference_'] = array(
336
  'name'     => 'Reference ',
337
  'options'  => 'AVCPD',
338
  'select'   => 'T',
339
  'maxlen'   => 125,
340
  'sort'     => true
341
);
342
$opts['fdd']['Date_Created'] = array(
343
  'name'     => 'Date Created',
344
  'options'  => 'AVCPD',
345
  'select'   => 'T',
346
  'maxlen'   => 10,
347
  'sort'     => true
348
);
349
$opts['fdd']['Last_modified'] = array(
350
  'name'     => 'Last modified',
351
  'options'  => 'AVCPD',
352
  'select'   => 'T',
353
  'maxlen'   => 10,
354
  'sort'     => true
355
);
356
$opts['fdd']['Author'] = array(
357
  'name'     => 'Author',
358
  'select'   => 'D',
359
  'maxlen'   => 10,
360
  'sort'     => true,
361
  'values'   => array(
362
          'table'  => 'lab_members',
363
        'column' => 'id')
364
);
365
$opts['fdd']['Date_'] = array(
366
  'name'     => 'Date',
367
  'options'  => 'LFAVCPD',
368
  'select'   => 'N',
369
  'maxlen'   => 10,
370
  'sort'     => true,
371
  'default'  => date("Y-m-d", strtotime("now"))
372
);
373

    
374
// TRIGGER
375
// Before displaying the view page
376
$opts['triggers']['select']['pre'][] = 'strains.TSP.php';
377
require("footers.php");
378
?>